Skip to content

Palette From Image

Node icon
Color

Automatically extracts the dominant colors from any image, turning a reference photo into a usable palette.

A palette extracted from the source image.
The source image beside the palette-remapped variants arranged into one figure.

Palette From Image has two modes.

  • Cluster uses k-means to find the most prominent colors (up to 64). They are averages, so they may not appear in the source literally.
  • Exact returns the source’s actual distinct colors (up to 256), for a sprite, tileset, or reference palette image whose palette must match exactly.

If the source has more distinct colors than the cap, the extras are dropped in Sort By order and the node says so. Fully transparent pixels are ignored in both modes.

Wire the output into Palette Remap to generate variants in a reference image’s colors, such as a brand guide screenshot or a photo.

Export Palette saves the extracted colors as a .gpl, .ase, or .pal file, the same formats the Palette node exports, for reuse in GIMP, Krita, Aseprite, and other tools. It stays disabled until the node has produced a palette.

Pins

ImageImage
InputRequired
PalettePalette
Output

Palette

ColorsInteger
Default: 8 Range: 2–256

Number of colors to extract.

  • Cluster: up to 64; a higher value is treated as 64.
  • Exact: the most colors returned, up to 256. Extra colors are dropped in Sort By order and the node reports it.
AttemptsInteger
Default: 3 Range: 1–10

How many times the clustering restarts; the best result is kept. Higher = better colors but slower. Cluster mode only

ModeChoice
Default: Cluster

How colors are extracted from the source image.

Fully transparent pixels are ignored.

  • Clusterk-means over a downsampled sample. Fast, and the colors are averages, not colors actually present in the source. Capped at 64 colors.
  • ExactThe source's actual distinct colors at full resolution, up to 256. Use it for a sprite, tileset, or reference palette image where the palette must match the source exactly.

Output

Sort ByChoice
Default: Hue

How to order the output palette colors

  • HueSort extracted colors by hue, creating a rainbow-like order.
  • LuminanceSort from darkest to lightest color.
  • SaturationSort from the most muted color to the most vivid.
  • FrequencySort by how common each color is, most dominant color first.
  • Switch to Exact for pixel art: the palette comes back with the sprite’s real colors, ready for Palette Remap or the Pixel Art node.
  • In Cluster mode, raise Attempts if the extracted colors miss an important accent; the best of several k-means runs is kept.