color_tools.importers.riffpal_importer
RIFF PAL palette importer.
Imports RIFF PAL binary palette files into PaletteExportData.
RIFF PAL format structure:
RIFF <file size> PAL data <chunk size> <LOGPALETTE data>
The LOGPALETTE payload inside the data chunk is:
WORD palVersion WORD palNumEntries PALETTEENTRY[palNumEntries]
Each PALETTEENTRY is:
BYTE peRed BYTE peGreen BYTE peBlue BYTE peFlags
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.riffpal_importer.RiffPalImporter[source]
Bases:
PaletteImporterImport RIFF PAL (.pal) palette files.
RIFF PAL is a binary RIFF container whose form type is
PAL `` and whose palette data is stored in a ``datachunk.The
.palextension is shared with JASC PAL, so this importer detects its format by checking the RIFF and PAL signatures.- property metadata: ImporterMetadata
Return metadata describing the RIFF PAL importer.