Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

COL Palette File Format

256-color RGB palette format.

Each file maps color indices (0–255) to RGB values. Models reference palette entries via color_index in solid-color face data (see 3D.md).

Overall Structure

All COL files are exactly 776 bytes.

OffsetSizeTypeNameDescription
0x004u32file_sizeAlways 776.
0x044u32magicAlways 0x0000B123.
0x08768[u8; 768]palette256 × RGB triplets (3 bytes each, values 0–255).

Palette entry N is at offset 8 + N × 3, yielding bytes (R, G, B).

Usage

COL files are per-scene, not per-model. Different levels use different palettes (e.g. ISLAND.COL, CATACOMB.COL). The same color_index in a model’s face data produces different colors depending on which palette is active.

Entry 0 is always (0, 0, 0) — black.

  • TEXBSI — the CMAP subrecord in animated TEXBSI images uses the identical 256 × RGB triplet layout (768 bytes). CMAP palettes are embedded per-image; COL palettes are per-scene.
  • FNT — font files embed their own BPAL/FPAL palettes (same 768-byte layout), independent of scene COL palettes.

External References