Skip to content
ToolZone

Image Color Palette Extractor

Upload an image to automatically extract its dominant colors and generate a reusable, exportable color palette from what's actually in the photo.

Runs in your browser. Nothing you enter or upload leaves your device.

Click or drag an image here

Images are processed entirely in your browser and never uploaded anywhere.

Keyboard shortcuts

Run the main action
⌘ / Ctrl + Enter
Copy the result
⌘ / Ctrl + Shift + Enter
Download the result
⌘ / Ctrl + S
Paste a file or image into file tools
⌘ / Ctrl + V
Search all tools
⌘ / Ctrl + K
Show these shortcuts
?

You can also drop files anywhere on the page.

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. 1

    Click the drop zone or drag an image file onto it.

  2. 2

    Wait for the palette to appear below the image preview.

  3. 3

    Move the Number of colors slider between 3 and 10 to get a smaller or larger palette.

  4. 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.

Input
Beach photo, Number of colors: 5
Result
A list ordered by coverage, typically led by sky blues and sand beiges, followed by sea turquoise and darker shadow tones

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.

Input
Logo PNG with white background, Number of colors: 3
Result
White (or near-white) first, then the logo's two main colors

Background pixels usually outnumber logo pixels. Use a transparent PNG to skip the background, since mostly transparent pixels are ignored.

Limitations
Colors are ranked by how much of the image they cover, so small accent colors may be missed. Similar shades are grouped into fairly coarse buckets, and very subtle variations are averaged together. Only one image is analyzed at a time, and the palette can't be exported as a swatch file.
Assumptions
The image uses standard sRGB colors, like most photos and web graphics. Pixels more than half transparent are not part of the design you want to sample.
Privacy
Your image is read and analyzed on a canvas in your browser and is never uploaded to a server.

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.

Related tools