Extract a photo palette

Extract main colors from a photo

Extract 4–10 main colors locally, click to copy HEX, and export a watermark-free swatch card.

Images are sampled locally, not uploaded; swatches are a quantized approximation, not a single correct answer

Local image

Turn a photo into usable swatches

On device

A sample image is loaded. Extract it now or choose your own photo.

Copyable swatches

This image’s color fingerprint

Export swatch cardArrange the source and swatches into a 1200 × 630 sharing card.

Methods & limits

Quantize first, then avoid a row of nearly identical swatches

The tool shrinks the image to a sampling grid, groups nearby RGB values into buckets, and ranks them by frequency. Candidates that are too close are skipped so the palette stays distinct.

A photo’s main colors depend on crop, lighting, and sampling precision. These are useful representative colors, not a lossless count of every pixel.

RGB quantization step: 24. Candidate Euclidean distance must exceed about 54, then colors sort by frequency, hue, or relative luminance.

FAQ

Extract main colors from a photo · FAQ

Why is my favorite visible color not first?

Main colors rank by pixel frequency, so large backgrounds often lead. Add more swatches or sort by hue to find accents.

How is transparent PNG handled?

Highly transparent pixels are ignored; partly transparent pixels use the RGB produced by browser decoding.

Is the image uploaded?

No. Reading, downsampling, clustering, and card export all happen in this browser.