color_tools.exporters.hex_exporter

HEX palette exporter.

Exports colors as one lowercase six-digit hexadecimal RGB value per line by default. Python callers may request uppercase output with HexExportOptions.

Format example:

ff0000 00ff00 0000ff

The leading # is omitted to match the common Lospec-style HEX palette representation.

class color_tools.exporters.hex_exporter.HexExportOptions(uppercase=False)[source]

Bases: ExportOptionsBase

Configure letter casing in plain-text HEX palette output.

Parameters:

uppercase (bool)

uppercase: bool
__post_init__()[source]

Validate HEX export options.

Return type:

None

class color_tools.exporters.hex_exporter.HexExporter[source]

Bases: PaletteExporter

Export color palettes as plain-text hexadecimal RGB values.

Each color is written as lowercase rrggbb on its own line with no leading # by default. HexExportOptions(uppercase=True) selects uppercase output for an individual Python export operation.

This representation matches the HEX palette format commonly exported by Lospec and other palette-oriented tools.

property metadata: ExporterMetadata

Return metadata describing the HEX exporter.