Skip to content
RGBHex

Image Palette Extractor

Pull a color palette out of any image — 100% in your browser. The image is never uploaded; extraction runs on your device with a median-cut algorithm in a Web Worker. Copy any swatch, or export the whole palette as CSS variables.

Drop an image here, or

Your image stays on your device — nothing is uploaded.

Colors:

Your extracted palette will appear here.

How to use the palette extractor

Drop an image onto the panel (or click to choose one), pick how many colors you want, and the palette appears instantly. Click any swatch to copy its hex, or grab the whole set as CSS variables or a JSON array. Everything happens on your device — the image is never uploaded.

Private by design

Most online image tools upload your file to a server. This one doesn’t: the browser decodes the image, downsamples it on a Canvas, and runs the quantization in a Web Worker — so the UI stays smooth and nothing touches the network. No accounts, no uploads, no tracking of your images.

Frequently asked questions

Is my image uploaded to a server?

No. The image never leaves your browser. It's decoded, downsampled, and analyzed entirely on your device using the Canvas API and a Web Worker — nothing is sent over the network. That's both a privacy guarantee and why it works offline once the page has loaded.

How are the colors chosen?

The tool uses modified median-cut quantization — the same approach color-thief uses — which recursively splits the image's colors into buckets and picks a representative for each. It runs in a Web Worker so the page stays responsive even for large images. Large uploads are downsampled first to keep it fast.

How many colors can I extract?

Choose 4 to 12. Fewer colors give you the broad, dominant tones; more colors surface secondary accents. The image is only read once — changing the count re-runs the quantization on the cached pixels, so it's instant.

What can I do with the palette?

Click any swatch to copy its hex, or copy the whole palette as CSS custom properties (`--palette-1`, `--palette-2`, …) or a JSON array. Pair it with the converter to fine-tune a color, or the theme builder to turn one into a full Tailwind scale.

Why does the palette differ from the image's obvious colors?

Median-cut favors colors by area, and near-white and fully transparent pixels are skipped so backgrounds don't dominate. A color that catches your eye but covers little area may not appear; raising the color count usually surfaces it.

Related tools

References

This tool’s color math is grounded in the following standards and primary sources.

Reviewed by Jimmy Raymond, Engineer
B.S. Environmental Engineering · B.S. Computer Science · Last reviewed June 2, 2026

Spotted an error? Let us know — reader corrections are the best review this site gets.