Where can I find the specification for the CS2/CS3 Swatch Exchange format? Only thing I can find in the way of color formats is the version 1 specification for .aco swatches, but I need the .ase specification.
I have looked in various CS2/CS3 SDK's, but so far no luck.
Anyone who can help?
Regards,
Joergen Bech
Any luck finding the file format specs? I'm looking for them as well.
As far as I can tell from the files included with the various CS2 and CS3 applications, .ase files support RGB, CMYK, and Gray. Palettes are limited to 9999 swatches, but I presume this is a hard limit imposed by the applications rather than the file format.
The biggest stumbling block is the interpretation of the component values. Here are a few samples in decimal, hex, and binary formats:
RGB
0: 00 00 00 00 00000000 00000000 00000000 00000000
1: 3B 81 00 00 00111011 10000001 00000000 00000000
2: 3C 00 80 00 00111100 00000000 10000000 00000000
3: 3C 41 00 00 00111100 01000001 00000000 00000000
4: 3C 80 80 00 00111100 10000000 10000000 00000000
5: 3C A0 C0 00 00111100 10100000 11000000 00000000
6: 3C C0 C0 00 00111100 11000000 11000000 00000000
.
255: 3F 80 00 00 00111111 10000000 00000000 00000000
CMYK
0: 3C 24 00 00
1: 3C A3 C0 00
255: 3F 80 00 00
My bet is that we are looking at single-precision float numbers, but there are still a few things that do not add up. Or maybe I did not create my test files correctly. I'll have another go at it if I find the time. Still, I prefer to work with complete, official documentation.
.ase is just one of several formats I would like to support, but it seems to have a few limitations:
<http://indesignsecrets.com/create-swatches-once-use-in-all-cs2-applications.php>
I do not understand why Adobe would want to create another palette format, yet make it so limited.
Palettes are limited to 9999 swatches
It's a limitation of ASE 1.0 spec.
.ase files support RGB, CMYK, and Gray
It also supports Lab colors with 'LAB ' color mode.
My bet is that we are looking at single-precision float numbers
That's correct. They're IEEE 754 floating point values.
but there are still a few things that do not add up
Look at difference between process and spot swatches, global and non-global swathces. Illustrator CS2 swathces and CS3 swatches containing swatch groups.
Sorry I can't publicize ASE format specification here but it's a very simple format, easy to reverse engineering.
BTW, ASE is not another palette format. Illustrator's swatch format is still native Illustrator format. A purpose of ASE is exchanging certain color swatches between Suite applications. Patterns and gradients highly depends on application's object model, thus it is difficult to share amoung Suite applications (well, gradients are not so difficult but more complex than solid color swatches.) ASE file format spec has some room to extend for gradients and such. I'm not sure about advantages of ASE over Book Color.
Good to hear that LAB is supported as well.
I understand that this is a lowest common denominator format, then. Still does not explain the lack of HSB support :(
Thanks again.
Regards,
Joergen Bech
As I did it on company time, I cannot give you the specification as it is not mine to give. Sorry. Had I done it on my own time and if it was not related to my work, I would have posted it in a second.
But to summarize, look for the following elements (in no particular order):
- header
- version
- "block count"
- blocks
- color group start
- color group end
- swatches
- "zero block"
- strings
For swatch "blocks"
- swatch header
- block length
- swatch name
- color space
- color component values (single-precision floats)
- swatch attributes
The only thing to really watch out for is that the count near the beginning is *not* the swatch count, but the number of "blocks" in the file, which also includes color group information.
Regards,
Joergen Bech
Regards,
Joergen Bech