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.

🧵

Drag & Drop Image

Processing... 0%
Reading image file
Downscaling pixels
Running median-cut quantization
Building the palette

Result

Preview Output

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.