Bug 135561 - Extend Adobe .ase colour palette support
Summary: Extend Adobe .ase colour palette support
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2020-08-08 17:00 UTC by Volga
Modified: 2020-08-10 17:23 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2020-08-08 17:00:27 UTC
Although we have already got this support (bug 84002), it's still necessary to add some improves to give better support for this format. FreieFarbe e.V. published the CIELAB HLC Colour Atlas (XL), a free standard for color communication. On the website they provided some ASE palettes, however both of them failed on LibreOffice.

Steps to Reproduce:
1. Download ZIP package from freiefarbe
2. Extract ASE palettes
3. Move to LibreOffice user configuration folder

Actual Results:
While the ASE palettes installed, all of them failed to produce colors, but show rather blocks in black.

Expected Results:

Reproducible: Always

User Profile Reset: No

Additional Info:
Comment 1 Julien Nabet 2020-08-09 09:10:28 UTC
ASE is not documented officially but it seems it supports several types of colour spaces:
- Grayscale
See https://www.cyotek.com/blog/reading-adobe-swatch-exchange-ase-files-using-csharp

I gave a try with HLC-Colour-Atlas_EPV_Swatches_v2-3.ase and could reproduce this on pc Debian x86-64 with master sources updated today. But this palette contains "LAB" colour space and this one isn't supported.

Chris/Tomaz: any thoughts here?
Comment 2 Tomaz Vajngerl 2020-08-10 06:14:18 UTC
Yes, we need to add the code to convert from other colorspaces to RGB as we only handle RGB (and grayscale).
Comment 3 Julien Nabet 2020-08-10 17:23:45 UTC
(In reply to Tomaz Vajngerl from comment #2)
> Yes, we need to add the code to convert from other colorspaces to RGB as we
> only handle RGB (and grayscale).

yes but I read several links and the only thing that's sure is it needs a 2-steps conversion:
- convert LAB to XYZ
- convert XYZ to RGB
See http://www.brucelindbloom.com/index.html?Equations.html

For the rest, formula, coefficients may differ. It also depends on parameters like "white point" and other elements that I don't know.
- https://en.wikipedia.org/wiki/CIELAB_color_space#RGB_and_CMYK_conversions
- http://www.brucelindbloom.com/index.html?Equations.html
Not easy...

Another thing I noticed too, according to https://www.cyotek.com/blog/reading-adobe-swatch-exchange-ase-files-using-csharp, nChunkType should be 2 bytes and nChunkSize 4 bytes. In LO codes, it's the contrary.