🎨 Color Palette Extractor

Upload an image to extract its most common colors as a palette. This is different from the Image Color Picker, which reads a single pixel you click — this scans the whole image and finds the dominant colors automatically.

How the palette is chosen

Your picture never leaves the device: it is read locally, drawn onto a canvas inside the page and counted there. Nothing is uploaded.

The image is first scaled so its longest side is 150 pixels - a 3000×2000 photo becomes 150×100, or 15,000 sampled pixels. Each lands in a color cube 32 levels wide:

bucket = (floor(R/32)×32, floor(G/32)×32, floor(B/32)×32)
8 × 8 × 8 = 512 possible buckets

Buckets are ranked by pixel count, the top 2 to 12 kept, and each swatch shows the average of the true RGB values in that bucket, not the bucket's corner. Pixels with alpha below 128 are skipped, so a transparent PNG background never appears as a color.

Reading the numbers

That 150-pixel downscale is a smoothed resample, so pixels are blended before counting. One bright pixel in a large photo will not reach the palette, and a thin colored line can average into its background.

Frequently asked questions

Is my image uploaded anywhere?

No. It is analysed by JavaScript in your own browser through a canvas, so private photos, screenshots and client artwork stay on your machine.

How do I get the hex codes out of a photo?

Choose the file and every swatch prints its hex value underneath, ready to paste into CSS. For one exact pixel rather than the dominant mix, use the Image Color Picker.

Why do the colors change when I ask for more of them?

Percentages are worked across the swatches on screen, so going from six to twelve re-splits the same 100% and admits smaller buckets. The dominant colors keep their order.