color_tools.exporters.lospec_exporter
Lospec JSON palette exporter.
Exports colors using Lospec’s JSON palette representation:
{
"name": "Palette Name",
"author": "Author Name",
"colors": [
"FF0000",
"00FF00",
"0000FF"
]
}
Colors are serialized as six-digit hexadecimal RGB strings without a leading
#.
The exporter supports palette-level metadata through PaletteExportData. When metadata is unavailable, the palette name falls back to the output filename and the author field is left empty.
These files should be shareable on the Lospec palette list (https://lospec.com/palette-list) and compatible with Lospec’s palette viewer (https://lospec.com/palette-viewer).
- class color_tools.exporters.lospec_exporter.LospecExporter[source]
Bases:
PaletteExporterExport color palettes using Lospec’s JSON palette representation.
Lospec palettes contain:
name
author
colors
Each color is represented as an
RRGGBBhexadecimal string without a leading#.Palette-level metadata is preserved when export_palette() is used.
- property metadata: ExporterMetadata
Return metadata describing the Lospec exporter.