Color Palette Extractor — Get Dominant Colors from Any Image

Free online color palette extractor: find the dominant colors in any photo with k-means clustering, copy hex codes or download the palette as PNG — 100% in your browser, images never uploaded.

🔒 Runs entirely in your browser — your files never leave your device.

About Color Palette Extractor

Drop a photo and this tool finds its dominant colors — a ready-made palette you can copy into design tools, CSS, or slide decks. Colors are detected with k-means clustering on a downscaled copy of the image, so even large photos are analyzed instantly, and the same picture always yields the same palette. Everything runs locally in your browser; your images are never uploaded.

How to use Color Palette Extractor

  1. Drop, browse, or paste (Ctrl+V) the image you want to analyze.
  2. Pick how many colors to extract (3–10, default 6) — the palette updates automatically.
  3. Click a swatch to copy its hex code, or copy / download the whole palette.

How the palette extractor works

From photo to palette

Your image is first shrunk so its longest side is at most 120 pixels — large enough for the color statistics to be representative, small enough to analyze instantly. Fully transparent pixels are ignored, so an alpha channel cannot skew the result toward black.

The remaining pixels are grouped with k-means clustering in RGB space: each swatch is the average color of one group, and the percentage shows how large that group is. The clustering is seeded deterministically from evenly spaced samples, so the same image always produces the same palette.

Using the result

Click any swatch to copy its hex code, copy the whole palette as a JSON array, or download it as a PNG strip. The palette is a practical starting point for UI themes, artwork, or presentations — though k-means in RGB space is a statistical rather than perceptual measure, so very similar shades can occasionally land in separate swatches.

Frequently asked questions

Is this tool really free?

Yes — free with no account, watermark, or limits.

Are my images uploaded anywhere?

No. The analysis happens on a downscaled copy of your image inside your browser. The page even keeps working once you go offline.

How are the dominant colors chosen?

The image is shrunk to at most 120 pixels per side and its pixels are grouped with k-means clustering in RGB space. Each swatch shows the average color of one group and its share of all pixels.

Why don't transparent areas appear in the palette?

Fully transparent pixels are skipped before clustering, so a PNG's alpha channel does not distort the colors.

Which image formats are supported?

Any format your browser can open: PNG, JPEG, WebP, GIF (first frame), AVIF, and more.

Related tools