color_tools.exporters.paintnet_exporter

PAINT.NET palette format exporter.

Exports colors in PAINT.NET’s .txt palette format with AARRGGBB hex codes. Supports optional comment headers for palette metadata.

class color_tools.exporters.paintnet_exporter.PaintNetExporter[source]

Bases: PaletteExporter

PAINT.NET palette format exporter.

Exports colors in PAINT.NET’s palette format (.txt). Uses AARRGGBB hex format (alpha-first, uppercase, no # prefix).

Format structure:

;paint.net Palette File ;Comments start with semicolon AARRGGBB AARRGGBB …

Example output:

;paint.net Palette File ;Palette Name: My Colors ;Colors: 16 FF000000 FF1D2B53 FFFF0000

All colors are exported with full opacity (FF alpha channel).

Example

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

Return metadata describing this exporter’s capabilities.

Returns:

ExporterMetadata instance with name, description, capabilities