Image Color Extractor

Upload a photo or graphic and instantly extract its dominant colors as a copyable HEX palette. Free and private โ€” the image is analyzed in your browser and never uploaded.

๐ŸŽจ Drop your image here

or click to browse โ€” JPG, PNG, WebP, GIF, BMP ยท stays on your device

How to extract colors from an image

  1. Upload an image. Drag and drop a JPG, PNG, WebP, GIF or BMP file into the box above, or click it to browse. The photo is analyzed instantly on your device.
  2. Review the palette. The tool finds the dominant color and a palette of the most representative colors, with the share of the image each one covers. Change the palette size to get more or fewer colors.
  3. Copy or export. Click any swatch to copy its HEX code, copy the whole palette as a list or CSS variables, or download the palette as a PNG swatch strip. You can also click the image itself to pick a single pixel's color.

About this tool

This free image color extractor (also called a color palette generator from image, or image color picker) uses median-cut quantization refined with k-means clustering โ€” the same techniques classic image editors use โ€” to find the colors that best represent your picture. It is ideal for building a website color scheme from a brand photo, matching UI colors to a logo, creating art or interior-design palettes, and grabbing the exact HEX value of any pixel with the built-in eyedropper.

Your image never leaves your computer: decoding, sampling and quantization all happen locally in your browser with the HTML5 canvas, so it is safe to use with unreleased designs, client logos and private photos. Once you have your palette, refine it with our Color Shades Generator or check text readability with the Contrast Checker.

Frequently asked questions

How does the tool decide which colors are "dominant"?

It samples thousands of pixels from your image, splits the pixel cloud along its widest color axis with the median-cut algorithm, then refines the groups with k-means clustering so each palette color sits at the center of a real color cluster. The palette is sorted by how many pixels belong to each cluster โ€” so the first color covers the largest share of the image.

Why doesn't the palette contain a small accent color I can see in the image?

Palette colors are weighted by pixel count, so a tiny accent that covers only a small fraction of the image can be absorbed into a larger group. Increase the palette size to 12 or 16 colors, or simply click that spot on the image to pick its exact pixel color. Conversely, if your image has fewer distinct colors than you requested, near-identical entries are merged and you may see fewer swatches โ€” that is expected.

Are my photos uploaded to a server?

No. The file is read directly by your browser and processed with JavaScript and the canvas element on your own device. Nothing is transmitted, stored or logged, and the tool even works offline once the page is loaded.

What image formats and sizes are supported?

Any format your browser can display: JPG, PNG, WebP, GIF (first frame), BMP, AVIF and SVG. Large photos are automatically downsampled for analysis, so even multi-megapixel images are processed in well under a second.