Overview
Quantizes an image by replacing every pixel with the nearest color in a palette. It is
the finishing step that reduces continuous-tone assets such as gradients and noise to
a fixed color count for pixel art. Use dither for a patterned reduction; use this
node for flat color regions.
Usage tips
- Connecting the project palette is the standard setup. Asset colors stay
consistent, and later palette-side replacement through
palette_swapand similar nodes continues to work. - The standard position is at the end of the graph, immediately before export. Intermediate nodes such as blur and curves create new colors, so processing after quantizing increases the color count again.
- With no palette connected, automatic
Representativeextraction is suited to quantizing.Exactis for collecting colors actually used by an image that already follows a palette. - The
paletteoutput exposes the palette actually used, so it can feed downstreampalette_*nodes or reference output.
Common pitfalls
- Subtle tonal detail disappears: nearby colors intentionally collapse to the same
palette entry. Add intermediate colors to the palette or use
ditherfor simulated intermediate tones. - Pixels map to unexpected colors: two extremely similar palette colors can make
assignment unstable. Clean up the palette or separate luminance upstream with
tone_curve. - Artifacts appear on transparent edges: replacement can expose the color of
translucent pixels. Check
preserve_alpha(ON by default), and if needed clean up edges upstream withanti_aliasor another edge operation.
Notes
- A connected palette takes priority.
- Without one, a palette is created from the image according to
extract_modeandmax_colors. - You can use separate
Palette Extract+Palette Quantize, orPalette Quantizealone.
Examples
- Quantize an image to 16 colors.
- Match an asset image to an existing palette.
- Align a source image to its palette before
Palette Swap.
Related nodes
ditherโ quantize with a dither pattern using the same parameter familypalette_extractโ extract only the palette as a separate operationpalette_swapโ replace the entire palette after quantizinggradient_mapโ recolor by a luminance โ ramp rule rather than nearest-color search