GIMP Palette Export Format
The GIMP exporter creates palette files in the GIMP Palette format (.gpl), which is supported by GIMP, Inkscape, Krita, and many other graphics applications.
Format Details
Section titled “Format Details”| Property | Value |
|---|---|
| Identifier | gimp |
| Extension | .gpl |
| Use case | GIMP, Inkscape, Krita, graphics editors |
Output Format
Section titled “Output Format”GIMP PaletteName: viridisColumns: 16# 68 1 84 color-0 59 82 139 color-1 33 145 141 color-2 92 200 99 color-3253 231 37 color-4Each color entry contains:
- RGB values (0-255) with space alignment
- Tab-separated color name
CLI Usage
Section titled “CLI Usage”# Run with uvx (no installation required)uvx palettize create viridis --format gimp --output viridis.gpl --steps 16
# Or if installedpalettize create viridis --format gimp --output viridis.gpl --steps 16
# Custom palette namepalettize create viridis -f gimp -O palette_name="My Viridis" --steps 10
# Custom column countpalettize create viridis -f gimp -O columns=8 --steps 64Python Usage
Section titled “Python Usage”from palettize import create_colormap, get_scaler_by_name, get_exporter
cmap = create_colormap(preset="viridis")scaler = get_scaler_by_name("linear", domain_min=0, domain_max=1)exporter = get_exporter("gimp")
output = exporter.export( colormap=cmap, scaler=scaler, domain_min=0, domain_max=1, options={ "num_colors": 16, "palette_name": "Viridis Gradient", "columns": 8 })
# Save to filewith open("viridis.gpl", "w") as f: f.write(output)Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
num_colors | int | 256 | Number of colors to generate |
palette_name | str | colormap name | Name displayed in palette dialog |
columns | int | 16 | Number of columns in palette grid |
color_names | bool | True | Include color names |
Palette Name
Section titled “Palette Name”palettize create plasma -f gimp -O palette_name="Plasma Scientific" --steps 10GIMP PaletteName: Plasma ScientificColumns: 16#...Columns
Section titled “Columns”Controls how the palette is displayed in a grid view:
# 8 columns for a wider layoutpalettize create viridis -f gimp -O columns=8 --steps 64Color Names
Section titled “Color Names”Disable color names for cleaner output:
palettize create viridis -f gimp -O color_names=false --steps 5GIMP PaletteName: viridisColumns: 16# 68 1 84 59 82 139 33 145 141 92 200 99253 231 37Use Cases
Section titled “Use Cases”-
Export the palette:
Terminal window palettize create viridis -f gimp -o ~/.config/GIMP/2.10/palettes/viridis.gpl --steps 256 -
In GIMP:
- Open Windows → Dockable Dialogs → Palettes
- Right-click → Refresh Palettes
- Your palette appears in the list
Inkscape
Section titled “Inkscape”-
Export the palette:
Terminal window palettize create viridis -f gimp -o ~/.config/inkscape/palettes/viridis.gpl --steps 64 -
In Inkscape:
- Open Object → Fill and Stroke
- Click the palette icon
- Select your palette from the dropdown
-
Export the palette:
Terminal window palettize create viridis -f gimp -o ~/.local/share/krita/palettes/viridis.gpl --steps 32 -
In Krita:
- Open Settings → Manage Resources
- Click Refresh
- Access via the Palette docker
Aseprite
Section titled “Aseprite”Aseprite can import GIMP palettes:
-
Export with limited colors (Aseprite works best with smaller palettes):
Terminal window palettize create viridis -f gimp -o viridis.gpl --steps 32 -
In Aseprite:
- Open Sprite → Color Mode → Indexed
- Click “Load Palette” and select the .gpl file
Batch Export Multiple Palettes
Section titled “Batch Export Multiple Palettes”# Export several colormaps as GIMP palettesfor cmap in viridis plasma inferno magma; do palettize create $cmap -f gimp -o "${cmap}.gpl" --steps 64doneGPL File Format Reference
Section titled “GPL File Format Reference”The GIMP Palette format is a simple text format:
GIMP Palette # Required headerName: Palette Name # Palette name (shown in UI)Columns: 16 # Optional: grid columns# # Comments start with #R G B\tcolor-name # Color entries: RGB values, tab, name- RGB values are space-separated integers (0-255)
- Color names are optional but helpful
- Comments with
#are allowed after the header section