Colours out of an image, without uploading it

Decoded in this tab, sampled, clustered in OKLab — with the coverage of every swatch reported so you can tell dominant from useful.

HomeProfessionsDesign › Image palette

Colours out of an image, without uploading it

Decoded in this tab, sampled, clustered in OKLab. The image never leaves your device — there is no server here to send it to.

Local tool — nothing you make here is uploaded

Drop an image here, or click to choose.

PNG, JPEG, WebP, GIF or AVIF. It is read in this tab and never uploaded.

Nothing here leaves this browser. Colours, images, SVG and generated code are processed on your own device. No file is uploaded, nothing you enter is stored on a server, and none of it is passed to the analytics or advertising scripts on this page.
How the colours are chosen

The image is decoded locally and downsampled to at most about a megapixel, which bounds the work regardless of how large the file is. Pixels below an alpha threshold are skipped.

Samples are converted to OKLab and clustered with k-means seeded deterministically, so the same image gives the same palette every time. Clusters are ranked by how much of the image they cover.

Vibrant, muted, light and dark are derived from the clusters, not found separately: the most chromatic cluster, the least, the lightest, the darkest. Each keeps its coverage figure so you can see whether it represents much of the image or a corner of it.

Clearing releases the decoded pixels and the object URL. Nothing is written to storage unless you press save.

Dominant is not the same as useful

The most common colour in a photograph is usually the sky, the wall or the background — a large area of low-interest colour. It is the right answer to "what covers the most pixels" and often the wrong answer to "what colour is this image".

That is why coverage is shown for every swatch. A vibrant colour covering 3% of the image can be the one worth using, and knowing it is 3% is what lets you decide.

Extracted colours rarely pass contrast unchanged

Photographic colours cluster in the middle of the lightness range, which is exactly where neither black nor white text works well. The table shows what each one can carry; the ramp tool will take any of them and build usable strengths.