About the Image Color Palette Extractor
Image Color Palette Extractor finds the most common colors in a picture and lists them as HEX codes. Drop in a photo, a logo, a painting or a screenshot, choose how many colors you want, and copy the palette for your own design work.
How it works
The image is drawn onto a hidden canvas, scaled down so its longest side is at most 300 pixels, which keeps the analysis fast. The tool then reads every fourth pixel, skips pixels that are more than half transparent, and sorts the rest into buckets by dividing each red, green and blue value by 24. Colors that land in the same bucket are treated as the same family.
Each bucket keeps a running total of its pixels' colors. The buckets are ranked by how many pixels they contain, and for the top ones the tool outputs the average color of that bucket as a HEX code. So the first color shown is the most common color family in the image, and its value is the average shade of those pixels rather than one specific pixel.
How to use
- 1
Click the drop zone or drag an image file onto it.
- 2
Wait for the palette to appear below the image preview.
- 3
Move the Number of colors slider between 3 and 10 to get a smaller or larger palette.
- 4
Copy any HEX code with its copy icon, or click Copy all for a comma-separated list.
Worked examples
Beach photo
A travel blogger extracts 5 colors from a beach photo for a site theme.
Large areas like sky and sand dominate because the ranking is based on how many pixels fall into each color family.
Logo on a white background
A developer needs the colors of a two-color logo.
Background pixels usually outnumber logo pixels. Use a transparent PNG to skip the background, since mostly transparent pixels are ignored.
Frequently asked questions
How many colors can I extract?+
Between 3 and 10. The default is 6, and you can change it with the slider after loading an image.
Is my image uploaded to a server?+
No. The image is read and processed in your browser, so it never leaves your device.
Why is white or gray the first color?+
Colors are ranked by how many pixels they cover. Backgrounds and skies often take up the most space, so they come first.
Why isn't a small bright detail in my palette?+
Small areas have few pixels. Increase the number of colors or crop the image closer to the detail.
Are the HEX codes exact pixel colors?+
Each code is the average of all sampled pixels in a group of similar colors, so it may not match any single pixel exactly.