color_tools.importers.hex_importer
HEX palette importer.
Imports simple text palettes containing one hexadecimal RGB color per line.
Supported color forms:
RRGGBB #RRGGBB
Blank lines are ignored.
Comment lines beginning with # `` or ``; are ignored. A line containing a
bare #RRGGBB value is treated as a color rather than as a comment.
Because the HEX format contains no palette metadata or color names, imported colors use their hexadecimal value as the ColorRecord name.
Example
FF0000 00FF00 #0000FF
becomes:
#FF0000 #00FF00 #0000FF
- class color_tools.importers.hex_importer.HexImporter[source]
Bases:
PaletteImporterImport plain-text hexadecimal RGB palette files.
The format is intentionally minimal:
One RGB color per line.
Six hexadecimal digits.
Leading
#is accepted but not required.Blank lines are ignored.
Comment lines beginning with
# `` or ``;are ignored.
No palette-level metadata is available in the format.
- property metadata: ImporterMetadata
Return metadata describing the HEX importer.