COL Format (Dark Legions)
Jump to navigation Jump to search
The palette files for Dark Legions are essentially VGA Palettes ("modern" version using the full 0-255 range of byte values) with the addition of an 8-byte header for verification. The header theoretically allows for palettes that define a number of colors other than 256, but Dark Legions never does this and all its .COL files are 776 bytes in length.
|0x0000||UINT32LE||File length (typically 776)|
|0x0004||UINT32LE||"Magic number" signature, value should be 0xB123|
|0x0008||VGA Palette||Color definitions, each 3 bytes R-G-B with full 0-255 value range|
To verify a .COL file, in addition to checking the magic number, also ensure that the file length value matches the file's actual length (header included).