Nodes/Easy Color Correction/Color Palette Extractor
ComfyUI Node

Color Palette Extractor

Just the palette and histogram, without running full grading

By regiellis·Created about a year ago·Updated 6 months ago· 158
Color Palette Extractor
  • image
  • palette_data
  • histogram
  • palette_image
palette_size8
extract_palettetrue

The main Color Corrector can spit out a palette and histogram as a side effect of grading - but if all you actually want is "what colors are dominant in this image," running the whole correction pipeline just to get there is overkill. ColorPaletteExtractor is that one feature pulled out on its own.

What it is and why you'd reach for it

Reach for this when you're building a reference/mood-board workflow, feeding a palette into another color-aware node, or just want a quick swatch strip and RGB histogram for an image without touching its actual colors. It's the standalone version of a feature the pack's other nodes also expose behind an extract_palette toggle, minus everything else those nodes do.

How it works

It runs K-means clustering on the image in LAB color space - perceptually-aware rather than raw RGB distance, so visually similar colors cluster together the way a human would group them - and arranges the resulting dominant colors by brightness for a clean, natural-looking swatch order. The histogram is a standard multi-channel RGB distribution rendered as an image.

The inputs and outputs that matter

Just three inputs, and they're all required: image, palette_size (3-16 colors, default 8 - how many swatches you want back), and extract_palette (default on). Three outputs: palette_data - a plain comma-separated hex string (like #2A1810,#8B4513,#D2691E,...) you can pipe into a text node or any color-aware downstream node; histogram - an RGB distribution visualization; palette_image - a clean strip of color swatches with no borders or text clutter. Both image outputs are meant to be viewed, not processed further - connect them to a Preview Image node to actually see them, same as the palette outputs on the pack's other nodes.

How to install it

Via ComfyUI Manager: search "Easy Color Correction" and install - bundled with the rest of the pack. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/regiellis/ComfyUI-EasyColorCorrector.git
cd ComfyUI-EasyColorCorrector
pip install -r requirements.txt

then restart ComfyUI. This node's clustering leans on scikit-learn, so make sure the full requirements.txt installed cleanly rather than skipping it - without scikit-learn you'd be missing the actual extraction logic, not just a nice-to-have.

Common issues & troubleshooting

Outputs are black or empty. Check extract_palette is actually on - it's a required input here (unlike the other nodes where it's an optional toggle buried in the corrector), so this should be less likely to bite you than on the main Color Corrector, but it's the first thing to check regardless.

You connected the outputs and see nothing. palette_image and histogram are IMAGE outputs meant for a Preview Image node - if you're piping palette_data (the STRING output) into an image-expecting node instead, or vice versa, ComfyUI will complain about a type mismatch. Match the output name to what you're actually trying to see.

Palette doesn't match what you expected. palette_size controls how many clusters K-means looks for - a busy, high-variance image with palette_size set low will merge colors you'd consider distinct. Push it up toward the 12-16 range for images with a lot going on.

Categoryitsjustregi / Easy Color Corrector

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
palette_sizeINT83–16
extract_paletteBOOLEANtrue

Outputs (3)

NameTypeDescription
palette_dataSTRING
histogramIMAGE
palette_imageIMAGE