Pull the dominant colours out of any photo, screenshot, or logo and get them as HEX and RGB with the share of the image each one covers. The extraction uses median-cut quantisation rather than simply counting the most frequent pixel values — in a photograph almost every pixel is a slightly different colour, so the most common exact value is representative of nothing, which is why naive extractors return six shades of the same grey. Transparent pixels are skipped instead of being averaged in as black, which is what turns a logo's palette muddy in lesser tools. Export the result as CSS custom properties ready to paste into a stylesheet, or as JSON. Drop a whole folder to build palettes from a set of images at once. Nothing is uploaded — the image is read and sampled entirely on your device.
| Approach | On a photograph | On a flat graphic |
|---|---|---|
| Most frequent exact pixel | Near-identical neighbours | Works adequately |
| Median cut (used here) | Distinct, nameable colours | Exact colours, merged duplicates |
| Ignoring alpha | Fine | Black bleeds into every swatch |
| Full-resolution sampling | Hundreds of times slower | No better result |
By median-cut quantisation. Every pixel starts in one colour box, and the box with the widest spread is repeatedly split along its widest channel until there are enough clusters. Each cluster's average becomes a swatch. It gives colours a person would actually name, unlike counting exact pixel values, which in a photo returns near-identical neighbours.
The share of the sampled pixels that fell into that cluster. It tells you which colours genuinely dominate the image rather than just which ones are present — a small bright accent may catch your eye but cover two percent of the frame.
Pixels below an alpha threshold are skipped entirely. Including them would average black or white into every swatch, which is exactly what makes a logo's extracted palette look washed out in tools that do not check alpha.
Because the image does not contain that many distinct colours. A flat two-colour graphic cannot honestly yield eight swatches, so you get two. Clusters that end up nearly identical are also merged, since two indistinguishable swatches in a palette look like a bug.
No. It is read with the File API, drawn to a canvas in the page, and sampled there. Nothing is transmitted — which matters for unreleased designs and client work.
The image is drawn to an offscreen canvas downscaled to at most 200 pixels on its longest side, because sampling a 4000-pixel photograph gains nothing over a 200-pixel one and costs hundreds of times the work. Pixel data is read with getImageData and quantised by median cut: every opaque pixel starts in one colour box, and the box with the widest spread is repeatedly split along its widest channel until the requested number of clusters exists. The split point matters more than it looks — cutting at the median index can fall inside a run of identical values, which blends two distinct colours into one muddy average, so the split moves to the nearest index where the channel value actually changes. Each cluster's average becomes a swatch and its pixel count becomes its coverage share. Pixels below an alpha threshold are skipped entirely rather than being averaged in, since a transparent PNG would otherwise contribute black to every swatch. Clusters closer than roughly twenty units of RGB distance are merged, because two near-identical swatches in a palette look like a bug. Everything runs on the device; the image is never uploaded.