Talk:New Colours Format
Binary formats description
You can get samples of these by installing trial versions of the softwares.
Adobe Color Book (.acb)
The only addition to Ates Goral’s description is a little change at the end of the file for the CS2 and CS3 color books: these files end with a 8 bytes string saying spflspot for spot colors and spflproc for process colors.
Binary Color File (.bcf)
Most of this was found by comparing with the little documented ACF format.
Byte order is big-endian. Strings are NUL padded. Except for the Lab values, all shorts are unsigned. Character encoding is Mac Roman.
Version: 8bytes string (ACF 1.0/ACF 2.1/BCF 2.0)
Library Name: 32bytes string
Library Version: 8bytes string
Copyright: 32bytes string
About Message: 512bytes string
Names: short (1=Partial/2=Full)
Rows: short
Columns: short
Entries: short
Prefix: 12bytes string
Suffix: 4bytes string
Palette Type: short (1=Spot/2=Process/8=?/16=hifi/32=?)
4 shorts. I thought it could be some model list like in the ACF format but since every file I've analyzed has RGB and CMYK values, I don't know what are these...
- The first one is 1 for the Munsell palettes which contains XYZ values, 0 for the other ones, even for the PANTONE® Process Euro file which also has XYZ values... could be a mistake...
- For the second and the third ones (still 0 or 1), I couldn't find any relationship with anything else.
- The last one is probably Preferred Model where 1=RGB and 2=CMYK. I don't know what 8 and 16 stand for.
In version ACF 1.0, the color list starts here with <Entries>*54bytes: 3 shorts (XYZ), 4 shorts (CMYK), 3 shorts (RGB), 1 short (Type) and a 32bytes string (colour name).
In higher versions (ACF 2.1 and BCF 2.0), the palette informations goes on:
About Message extender: short. If this one is 1, it's followed by a 100bytes string which is to be added to the About Message.
HiFi Inks: short
Number of HiFi Inks: short
Lab: short. If this equals 1, colours have Lab values.
22 bytes, always 0 in all the files I've analyzed
2 bytes: 0x0168 (360) for the PANTONE® HEXACHROME files, 0 for the others
If <HiFi Inks> equals 1, here comes <Number of HiFi Inks>*54 bytes: 2*10bytes string and 1 short (should be the angle used to print halftone screens; the frequency or screen ruling used in printing halftones; and the neutral density of the ink for trapping; if it's like ACF) followed by a 32bytes string (Ink name).
Color list starts here:
Lab values: 3 shorts (=0 if <Lab>=0)
CMYK values: 4 shorts
RGB values: 3 shorts
If <Palette Type> equals 8 or 16, here comes 34bytes: 1 short (number of hifi inks used), 8 pairs of shorts (ink id/ink value)
Colour Type: 1 short
If <Palette Type> equals 8 or 16, Model: 1 short
Colour Name: 32bytes string
Corel Palette (.cpl)
Byte order is little-endian. Strings are composed of a char followed by <char> single or double-byte characters.
Colour spaces:
2 | CMYK | bytes 5-8 [0..100] |
4 | CMY | bytes 5-7 [0..255] |
5 | RGB | bytes 5-7 [0..255] |
6 | HSB | bytes 5-8 5+6=long H[0..360] SB[0..255] |
7 | HLS | bytes 5-8 5+6=long H[0..360] LS[0..255] |
9 | Grayscale | byte 5 [0..255] |
11 | YIQ | bytes 5-7 [0..255] |
12 | CMYK | bytes 5-8 [0..255] |
15 | Hexachrome | bytes 3-8 YOMCGK[0..255] |
17 | CMYK | bytes 5-8 [0..255] |
18 | Lab | bytes 5-7 [0..255] |
20 | Registration | bytes 5-8 [0..100] |
Version 5-8
Version: 2bytes hex string (ccbc/ccdc)
Entries: short
Color List
Colour space: short
Character encoding: short (1,2,7 => double-byte; 5,11 => single-byte)
Colour Values: 8 chars
Colour Name: string
Version 9-11
Version: 2bytes hex string (cdbc/cddc)
4 longs: always 3,0,30,1 in the files I've analysed
1 long: unknown1
1 long: always 2
1 long: unknown2 = unknown1 + 2 = palette header size - 2
Palette Name: string (cdbc => double-byte; cddc => single-byte)
1 short: unknown3
Entries: short
Colour List: there are 2 different ways to describe the colours but I don't know what should lead me to the long or the short way...
The short way is the same as 5-8
Here is the long way:
Order: long
Colour space 1: short
Character encoding 1: short
Colour Values 1: 8 chars
Colour space 2: short
Character encoding 2: short
Colour Values 2: 8 chars
Colour Name: string
Version 12-13
Version: 2bytes hex string (dddc)
Same as 9-11 except that the palette name is double-byte encoded
Special Palettes
Version: 2bytes hex string (dcdc)
Palette Name: string
Entries: short
Colour List
same as 5-8