⭐ 0

5-Color Palette From an Image — Online Extractor

Extract the real color palette of any photo in your browser: median-cut quantization finds 3–12 key colors with HEX codes, CSS variables and JSON export.

Processed entirely in your browser — nothing you enter here is ever uploaded.

🧵

Drag & Drop Image

Processing... 0%

Result

Preview Output

About this tool

This page opens the palette extractor preset to five colors — the classic palette size used by mood boards, brand sheets and design systems. Drop in a photo, press the button, and median-cut quantization reduces the image to the five colors that best represent it, sorted by how much of the picture each one covers.

Five is the sweet spot for most practical palettes: enough to capture a background, a midtone, two accents and a highlight, yet small enough that every color still has a job. The dominant color is marked on the first swatch, each swatch shows its pixel share and copies its HEX code on click, and the CSS variables block pastes straight into a stylesheet as --color-1 through --color-5.

The analysis runs entirely in your browser: the image is downscaled to roughly ten thousand pixels on a local canvas and quantized there, so private photos and unreleased artwork never leave your device. Want a palette built from color theory instead of a photo? The color palette generator creates harmonies from a base color — the complementary approach.

Example. Median-cut quantization of the opaque pixels returns the requested number of colors, each with a HEX code, ordered by how many samples fell in that box.

Limit. The color count is capped at 12, pixels with alpha below 128 are skipped, and sampling stops around 10000 pixels.