Automatically extract a dominant color palette from an image
Click or drag an image here to upload
This tool extracts the most frequent dominant colors from the image, which is different from this site's other "Image Color Picker" tool (which grabs the exact pixel color at a point you click) — this one automatically analyzes the overall color distribution of the whole image.
The Palette Extractor looks at an image and lists the colors that appear most often in it, as swatches with hex values such as #F07848. Click a swatch to copy its value. It is handy when you want a quick read of a reference photo's overall tones before choosing colors for a poster, slide deck, or web page. To be clear about what it does not do: you cannot choose how many colors to extract (it returns at most 6), it does not output RGB, HSL, or CSS variables, and it does not judge which colors look good together. It simply counts how frequent each color is.
To show how the values come about, we ran the tool's counting logic on a constructed set of pixels: 4000 pixels of RGB(250,120,60), 3000 of RGB(20,30,40), 1500 of pure white, 1000 of RGB(245,125,55), and 500 semi-transparent green pixels with an alpha of 100. The real output, in order, was #F07848 (4000 pixels), #181830 (3000), #FFFFFF (1500), and #F07830 (1000). That is only four colors, because the 500 semi-transparent pixels are skipped. Three things are worth noticing. First, #F07848 is not the original RGB(250,120,60): each channel is rounded to a step of 24 before counting, so the swatch shows the grouped color, which usually differs slightly from any exact pixel. Second, RGB(245,125,55) fell into a different bucket for the blue channel and was listed as its own color, #F07830, even though it looks almost identical to the first orange. Third, when an image has fewer than 6 grouped colors you get fewer than 6 swatches. If you need the exact value of one spot, use the site's Image Color Picker and click that pixel.
Because this tool outputs grouped, approximate colors. Each channel from 0 to 255 is rounded to the nearest multiple of 24, and anything above 255 is capped at 255 (which is why pure white comes out as #FFFFFF). The goal is to answer 'what colors is this picture mostly made of', not to reproduce one pixel. For an exact value, use a tool that samples a single pixel.
The number of swatches depends on how many distinct grouped colors the image has, so a simple image can produce only a few. Near-duplicates appear because grouping uses fixed steps, and two close colors on either side of a boundary count as different. Just pick one of them.
Resolution barely matters for the counting itself because the image is shrunk to 100 by 100 first. Loading a huge file still uses browser memory, though, so if the page feels sluggish, compress the image first.
A color value is just a number, but the image it came from may be protected by copyright. Taking inspiration from a reference image is usually fine; whether you may reuse the image or a very close copy of its palette commercially depends on where it came from and how you use it, and that call is yours to make.
The image is read with the browser's built-in file reader and drawn onto an internal canvas to count colors, all inside your browser. Looking at the code, the tool makes no network request to upload the image and stores nothing. When you refresh or close the page, the image and the results are gone.