Extract colours from an image
Drop a photo and we pull out its main colours — with the share of the image each one covers and the closest CSS colour name.
Your photo never leaves the browser. Nothing is uploaded — the pixels are read on this page and discarded.
Extracted colours
Click a colour to copy its HEX. The share is how much of the photo that colour covers.
No image yet — drop a photo above.
How the colours are picked
Pixels are sampled evenly across the photo, then split into groups with median cut: take the axis (red, green or blue) that spreads widest, cut where the values gap the most, and repeat until you have the number you asked for.
Each group is represented by the real pixel closest to its average, not the average itself. Averaging invents colours — a group holding both red and blue would report purple, which is nowhere in the photo.
The same photo always yields the same palette. The popular k-means approach starts from random seeds, so it drifts between runs.
Frequently asked questions
Is my photo uploaded anywhere?
No. It is opened inside your browser only, used to read pixels, and discarded when you close the page. There is no code here that sends it over the network.
Sometimes I get fewer colours than I asked for.
That happens when the photo does not hold that many clearly distinct colours. Padding the list would just repeat near-identical swatches, so colours you could not tell apart are merged instead.
How accurate is the share?
Sampled pixels are reassigned to the final colours and counted. Large photos are sampled down to about 20,000 pixels, so the last decimal may move, but the proportions match what you see.