UTILS.
Private by default
🖼◑

Image Color Extractor

Extract the dominant colors from an uploaded image as hex swatches.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
Drop an image here or click to choose
Click any swatch to copy its hex value.

About this tool

Drop in an image and extract its dominant colors as hex swatches, processed locally with a canvas — nothing is uploaded.

The image is read with FileReader and drawn onto a hidden 80 by 80 canvas, so it is stretched to a square and at most 6,400 pixels are analyzed. Pixels less than half opaque are skipped. Each other pixel goes into one of 512 buckets (the top three bits of red, green and blue), a bucket's real pixel values are averaged, and the six biggest buckets, most frequent first, become the swatches.

Because buckets are fixed ranges, not clusters, a smooth gradient can fill several swatches while a small accent color misses the top six. Click a swatch to copy its hex. Only the first file you drop or choose is used, and if the browser cannot decode it a "could not read" message appears.

Frequently asked questions

Are my images uploaded anywhere?
No — the image is drawn to a canvas and analyzed entirely in your browser; nothing leaves your device.
How are the colors chosen?
Pixels are sampled and grouped into color buckets, and the six most frequent buckets are returned as the dominant colors.
Why do two swatches look almost the same?
Colors are grouped into fixed ranges, so a gradient can spread across neighboring groups and give near-identical swatches.
Are transparent areas counted?
No. Pixels less than half opaque are skipped, so a transparent background gives no swatch.

More tools