Color Palette Extractor
Pull the dominant colors out of any image right in your browser — free, instant, and private. Drop in a photo, logo, or screenshot and get a palette of hex and RGB codes you can copy with a click. Choose how many colors to extract. Your file never leaves your device.
Updated June 2026
How the palette is built
This tool samples your image down to a small canvas, reads every pixel, and groups them into a handful of representative colors using median-cut quantization — the same family of algorithm used to build the limited palette in a GIF. Each swatch is the average of one group, and the percentage next to it is roughly how much of the image that color covers.
Sampling at a reduced size makes extraction instant even for large photos without meaningfully changing the result, since dominant colors survive downscaling. Fully transparent pixels are ignored so they don't pull the palette toward a phantom color.
Using the colors
Click any swatch to copy its hex code, or click the RGB line to copy that instead — handy for dropping straight into CSS, a design tool, or a brand style guide. Switch between 4, 6, 8, or 12 colors depending on whether you want a tight accent set or a fuller range.
Extracted palettes are a starting point, not a brand spec: the algorithm reports what's actually in the pixels, which may include compression noise or anti-aliased edges. Treat the dominant few as reliable and fine-tune from there.
Frequently asked questions
Does this tool upload my image anywhere?
No. The image is read and analyzed entirely in your browser on the HTML canvas — it's never sent to a server, so extraction is instant and completely private.
How does it pick the colors?
It samples the image's pixels and groups them with median-cut quantization, then averages each group into one swatch. Colors are ordered so the most dominant ones surface first, and the percentage shows roughly how much of the image each covers.
How do I copy a hex or RGB code?
Click a swatch or its hex code to copy the hex value; click the RGB line under it to copy the rgb(...) string. Both drop straight into CSS or a design tool.
Can I choose how many colors to extract?
Yes. Pick 4, 6, 8, or 12 colors. Fewer gives you a tight accent palette; more captures a wider range of tones in the image.
Why are some swatches slightly different from colors I see?
Each swatch is the average of a group of similar pixels, and photos contain compression noise and anti-aliased edges. The dominant few colors are the most reliable; use them as a starting point and adjust if you need exact brand values.
Related tools
- Image ResizerResize images to exact pixel dimensions online — free, instant, in-browser. No upload required.
- Image CropperCrop images to any aspect ratio or custom size online — free and in-browser.
- Image CompressorCompress JPG, PNG and WebP images to shrink file size — free online image compressor, runs in your browser.
- Gemini Watermark RemoverRemove the visible Gemini watermark from AI images — free, instant, 100% in your browser. Nothing is uploaded.
Want to make a meme?
memegen turns any image into a meme with AI-suggested captions. Free to start.
Browse meme templates →
memegen