color_tools.exporters.riffpal_exporter

Microsoft RIFF PAL palette exporter.

Exports colors to the binary Microsoft RIFF palette format.

RIFF PAL files use the Resource Interchange File Format (RIFF) container with a PAL `` form type and a ``data chunk containing a Windows LOGPALETTE:

RIFF
    <size>
    PAL
    data
        <size>
        WORD palVersion
        WORD palNumEntries
        PALETTEENTRY entries[...]

Each PALETTEENTRY contains four bytes:

red, green, blue, flags

The palette version is written as 0x0300 and entry flags are set to zero.

class color_tools.exporters.riffpal_exporter.RiffPalExporter[source]

Bases: PaletteExporter

Export color palettes in Microsoft RIFF PAL format.

RIFF PAL is a binary Windows palette format based on the RIFF container. It stores an ordered sequence of 8-bit RGB palette entries.

Color names and alpha values are not supported by this exporter.

PALETTE_VERSION = 768
property metadata: ExporterMetadata

Return metadata describing the RIFF PAL exporter.