color_tools.importers.jascpal_importer

JASC PAL palette importer.

Imports JASC-PAL text palette files into PaletteExportData.

JASC PAL format:

JASC-PAL 0100 <color count> R G B R G B …

Example

JASC-PAL 0100 3 255 0 0 0 255 0 0 0 255

The format does not contain color names or palette-level metadata, so imported colors use their hexadecimal value as the ColorRecord name.

class color_tools.importers.jascpal_importer.JascPalImporter[source]

Bases: PaletteImporter

Import JASC-PAL (.pal) palette files.

JASC PAL is a simple text format consisting of:

  • JASC-PAL signature

  • 0100 version

  • Declared color count

  • One R G B entry per color

The .pal extension is shared with RIFF PAL, so this importer detects its format by checking the JASC-PAL header.

property metadata: ImporterMetadata

Return metadata describing the JASC PAL importer.