ZLS colour tables
The ZLS System used text file based colour tables. The colour tables are written in unecrypted text format in .ctab files. The complete set of tables including this file are available as a single download (ZIP, 106kB). This also includes code for reading colour table files and writing 8 bit TIFFs.
Each file has a simple header indicating the exact variation of the format, and the number of colours in the table, followed by the colour indices and RGB values (or index + single grayscale values for simple gray tables).
There are three basic formats, indicated by the first line of the ctab file:
- 0: Decimal values used, i.e. 0-255, or 0-65535
- 1: Hexadecimal values used: ie 00 - FF or 0000 - FFFF
- 2: Floating point values: 0.0 - 1.0
The next line indicates the number of bits per value. It an be 8 or 16 for decimal and hexadecimal formats, and 16 for floating point format.
The next line indicates the number of colour components, 1 (grayscale) or 3 (RGB), then the number of colours follows, and is usually 256.
Finally the indices and values follow, 1 entry per line. For grayscale there are two columns, index then value, and for RGB there are 4 columns, index and red, green, blue values.
Format Examples:
13.ps.ctab: | 0.1.rss.ctab:0 | 31.123.ctab: | 0.2.gray.ctab: |
---|---|---|---|
1 8 3 256 0 00 00 7f 1 00 00 83 2 00 00 87 3 00 00 8b … | 1 16 3 256 0 ffff ffff ffff 1 fefe fefe f7bd 2 fdfd fdfd ef7b 3 fcfc fcfc e739 … | 0 8 3 256 0 0 0 0 1 0 0 0 2 95 0 114 3 98 0 112 … | 1 8 1 256 0 ff 1 fe 2 fd 3 fc … |
Hex 8 bit values, RGB | Hex 16 bit values, RGB | Decimal 8 bit values, RGB | Hex 8 bit values, Grayscale |
Download code for reading colour table files and writing 8 bit TIFFs (ZIP, 106kB)