Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Adobe Swatch Exchange (.ase) file format?

430 views
Skip to first unread message

Joerge...@adobeforums.com

unread,
May 5, 2007, 9:44:09 AM5/5/07
to
(This is a repost from the - somewhat quiet - Illustrator Developers SDK forum)

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

kmj...@adobeforums.com

unread,
Jun 13, 2007, 10:28:31 AM6/13/07
to
Joergen -

Any luck finding the file format specs? I'm looking for them as well.

Joerge...@adobeforums.com

unread,
Jun 13, 2007, 1:54:06 PM6/13/07
to
No, I started reverse-engineering it but quit shortly after writing the post. Still looking for documentation myself, but if I do not find any, I'll have to leave it out of the program I am working on.

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.

Satoski Komiyama

unread,
Jun 13, 2007, 11:38:04 PM6/13/07
to

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.

Joerge...@adobeforums.com

unread,
Jun 14, 2007, 1:22:14 AM6/14/07
to
Thank you for this information. I got the big-endian IEEE 754 part (just googling for 3F 80 00 00) and the string format as well. Other formats just use 8 or 16-bit integer values, which were easier to deal with when reading and parsing the files.

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

Aaron_...@adobeforums.com

unread,
Jul 19, 2007, 6:56:25 PM7/19/07
to
Any further information on the ASE specification? I'm trying to see if I can read the format from Flex, but I seem to be missing some needed information.

Joerge...@adobeforums.com

unread,
Jul 20, 2007, 1:00:09 AM7/20/07
to
Yes, Satoski Komiyama gave all the necessary clues in his post. Took me a day to work it out and write a reader/writer, though. He was right: It *is* easy to reverse-engineer, once you know which parameters to vary when creating test files. Not like ACDSystem Canvas palettes, which are a complete mess (uninitialized buffers, apparently).

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

Pure...@adobeforums.com

unread,
Sep 5, 2007, 4:55:13 PM9/5/07
to
I figured out the format [ASE] and wrote a php function to create the files .... is it OK for me to post it on my blog for other people to use [for free, of course]? Or is it copyrighted / patented?

Joerge...@adobeforums.com

unread,
Sep 6, 2007, 7:36:22 AM9/6/07
to
I wouldn't know, but if you did it all by yourself without any inside information, I don't see why not. Certainly, other Adobe formats are already documented in similar ways on the web, e.g. <http://www.duo-creative.com/chrisb/aco/>.

Regards,

Joergen Bech

0 new messages