Color palette from image

Drop in a photo to extract its main colors, or click anywhere on it to pick the exact color of a pixel. Your image never leaves your device.

Drop an image here or

JPG, PNG, WebP or GIF · processed locally

How palette extraction works

A photo has hundreds of thousands of pixels but only a handful of colors that matter. The extractor samples about 12,000 of them and runs k-means clustering: it places k centres, assigns every pixel to its nearest centre, moves each centre to the average of its pixels and repeats until the groups settle. Distances are measured in OKLab, a color space where equal distances look like equal differences, so a cluster holds colors you would call “the same”.

The bar above the chips shows how much of the image each color covers. Dominant colors make good backgrounds; small, saturated clusters make good accents.

Frequently asked questions

How do I extract a color palette from an image?

Drop or choose a photo. The image is scaled down in your browser and its pixels are grouped with k-means clustering in the OKLab color space, which groups colors the way people perceive them. Each cluster’s average becomes a palette color, and the share tells you how much of the image it covers.

How do I pick the exact color of one pixel?

Click or tap anywhere on the image. The pixel’s hex, RGB, HSL and OKLCH values appear in the loupe panel and are added to your picked colors.

Is my image uploaded anywhere?

No. The file is read with the browser’s FileReader and drawn to a canvas on your device. Nothing is sent to a server.

Why do the colors look slightly different from the photo?

Each palette color is the average of a cluster, so it represents a region, not a single pixel. Increase the number of colors for more detail, or pick exact pixels by clicking.