color_tools.exporters.jascpal_exporter

JASC-PAL format exporter.

Exports colors in JASC-PAL format used by Paint Shop Pro and other image editors. Simple text format with RGB values as space-separated decimals.

class color_tools.exporters.jascpal_exporter.JascPalExporter[source]

Bases: PaletteExporter

JASC-PAL format exporter.

Exports colors in JASC-PAL format used by Paint Shop Pro and other tools.

Format structure:

JASC-PAL 0100 {color_count} R G B R G B …

Example output:

JASC-PAL 0100 8 231 224 228 239 202 167 161 213 180

This format is compatible with Paint Shop Pro, Aseprite, and many other image editing applications.

Example

>>> from color_tools.exporters import get_exporter
>>> exporter = get_exporter('pal')
>>> from color_tools.palette import Palette
>>> palette = Palette.load_default()
>>> path = exporter.export_colors(palette.records[:10], 'colors.pal')
property metadata: ExporterMetadata

Return metadata describing this exporter’s capabilities.

Returns:

ExporterMetadata instance with name, description, capabilities