Converting Adobe Swatch Exchange Format (.ase) into ActionScript (.as)

Here’s a c#.net program that reads an .ase file and spits out an ActionScript array of objects.

This isn’t meant to be a tutorial or a product, but you’re welcome to use it!  It shouldn’t break anything, but use at your own risk, blah, blah, blah.

It does not output anything special about groups, just puts the colors into objects and the objects into an array, like:

var swatches:Array = [
   { name: ‘red’, color: 0xFF0000 },
   { name: ‘blue’, color: 0x0000FF }
];

It also only deals with RGB colors and won’t think about CMYK, LAB, etc.

Here’s the source and a Windows executable you may download: ASEConverter.zip

This information was extremely helpful: http://www.selapa.net/swatches/colors/fileformats.php#adobe_ase


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.