ACB2XML 2.0b – Export Adobe Color Book Data as XML

May 8th, 2007

Here’s a freeware tool that I had written back in 2003, shortly after reverse-engineering the Adobe Color Book Format. This command-line Windows application extracts color data from color book files and generates XML. Once the color data is safely in XML domain, the rest is up to your imagination…

Download acb2xml20.zip (30 KB)

If you don’t already know what color books are, there’s the Custom Colors dialog which appears when you click the Custom button on the Color Picker dialog. There, you can pick colors from a variety of color books which represent standard color catalogs by organizations like Pantone, Toyo, Trumatch, etc. The color book data is kept in files under the Presets/Color Books folder of your Photoshop installation. On Windows, they have the .acb extension.

Custom Colors Dialog

Custom Colors Dialog

To extract data, just pass in the filename of a color book. The resulting XML will go to standard output. To capture to a file, just redirect the output:

acb2xml focoltone.acb > focoltone.xml

For long filenames or filenames with spaces, quote the filenames:

acb2xml "PANTONE process coated.acb" > "PANTONE process coated.xml"

The resulting output will look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<color-book version="1.0" xmlns="http://magnetiq.com/ns/2007/05/colorbook">
    <version>1</version>
    <id>0bb9</id>
    <title><![CDATA[$$$/colorbook/FOCOLTONE/title=FOCOLTONE]]></title>
    <prefix><![CDATA[$$$/colorbook/FOCOLTONE/prefix=FOCOLTONE ]]></prefix>
    <postfix><![CDATA[$$$/colorbook/FOCOLTONE/postfix=]]></postfix>
    <description><![CDATA[$$$/colorbook/FOCOLTONE/description=]]></description>
    <colors>860</colors>
    <page-size>5</page-size>
    <page-offset>2</page-offset>
    <color-space>CMYK</color-space>
    <color>
        <name>1070</name>
        <alias><![CDATA[1070  ]]></alias>
        <cyan>100</cyan>
        <magenta>0</magenta>
        <yellow>0</yellow>
        <black>0</black>
    </color>
    <color>
        <name>1071</name>
        <alias><![CDATA[1071  ]]></alias>
        <cyan>0</cyan>
        <magenta>100</magenta>
        <yellow>0</yellow>
        <black>0</black>
    </color>
    ...

ACB2XML currently supports CMYK, RGB and Lab color spaces.

Known Issues

  • Some textual information is enclosed in CDATA blocks, instead of doing proper XML escaping. While this has no harm whatsoever, I may fix it in the future.

Legalese

Adobe® and Photoshop® are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.

5 Comments

  1. Yifan

    Great utility ! Thanks for sharing it :)

  2. mdakin

    Hi,
    I have been developing a Java library to treat Java classes as C structs, and as an example, I have written an Adobe Color Book reader – writer. Here is the code, please checkout using SVN, I will provide jars as well.
    BTW, Thanks a lot for the great work Ates.

    ACB reader writer Code:
    http://javastruct.googlecode.com/svn/trunk/javastruct/samples/photoshop/

    Project:
    http://code.google.com/p/javastruct/

  3. Kim Jensen

    Sweet!

    I was just about to do some reverse-engineering myself when i stumpled upon this. Awesome work!

  4. Ariel Demi

    Very cool indeed!

  5. Ariel Demi

    Hi,

    I would like to know if there is a way to control the output’s ColorSpace.

    Thanks,
    Ariel

Add a Comment