Custom Color Palettes for Low-Bit GIMP Exports

Configuring custom color quantization palettes in GIMP allows you to control the exact color space used when converting and exporting low-bit images, such as pixel art, retro game assets, or optimized GIFs and indexed PNGs. This guide provides a straightforward walkthrough on creating, importing, and applying custom colormaps to ensure your exports maintain precise colors and visual fidelity without unwanted color degradation.

Step 1: Create or Import Your Custom Palette

Before converting your image, you must have your target palette registered in GIMP:

  1. Open the Palettes dock by going to Windows > Dockable Dialogs > Palettes.
  2. To create a new palette: Right-click inside the Palettes dialog and select New Palette. Name your palette, right-click inside the color box area, and choose New Color from FG or double-click to define custom hexadecimal values.
  3. To import an existing palette: Right-click in the dialog, select Import Palette, and choose to import from an existing image, a gradient, or a palette file (.gpl, .pal, or .act).

Step 2: Convert the Image to an Indexed Colormap

Once your palette is available in GIMP, apply it to your project to quantize the colors:

  1. Open the image you wish to convert.
  2. Navigate to Image > Mode > Indexed... in the top menu.
  3. In the Indexed Color Conversion dialog under Colormap, select Use custom palette.
  4. Click the palette preview button and choose your custom palette from the list.
  5. (Optional) Uncheck Remove unused and duplicate colors from colormap if you need a fixed-size palette structure (e.g., exact 16-color or 256-color tables for hardware targets).

Step 3: Configure Dithering Options

The conversion window allows you to manage how non-matching colors blend:

  • Color Dithering:
    • None: Creates hard color boundaries, ideal for crisp pixel art.
    • Floyd-Steinberg (normal or reduced bleeding): Blends pixels to simulate intermediate shades, useful for photographic content.
    • Positioned: Applies a regular, Bayer-style pattern suited for retro rendering aesthetics.
  • Enable dithering of transparency: Check this box if your image contains semi-transparent alpha channels and you want them dithered into a binary mask.

Click Convert to quantize the image to your chosen palette.

Step 4: Export the Low-Bit File

With the image indexed, save the optimized file:

  1. Go to File > Export As....
  2. Choose a format that supports indexed color (such as PNG or GIF).
  3. Click Export. In the format-specific options dialog, ensure default options do not force conversion back to full 24-bit RGB (in PNG export settings, standard settings will preserve the indexed colormap automatically).
  4. Click Export to finalize your low-bit file.