Skip to content
I Hate Online Tools

Color palette

Dominant colors with hex codes.

This runs in your browser. Nothing is uploaded.

About Color palette

Groups an image's colours onto a coarse grid and reports the eight most common as hex codes, computed from the pixel data on your own machine rather than a server.

Building a design around an image means matching it: a background behind a hero shot, slide accents drawn from a product photo, a theme taken from an album cover. Picking by eye gets you near enough to look wrong, and sampling one pixel tells you about that pixel rather than about the image as a whole.

Every fourth pixel is sampled and each channel rounded to the nearest multiple of 32, then the resulting buckets are counted and the eight fullest printed as hex. The rounding is the useful part. A photograph contains thousands of near-identical shades, and grouping them into families is what stops the answer being eight versions of the same beige.

So the codes you get are bucket labels rather than colours guaranteed to exist in the file. A value like #c0a020 means a lot of pixels landed within sixteen levels of it, which is right for a palette and wrong if you need the exact colour of one specific thing — take that from the eyedropper. Dominance is by area too, so a large plain background can claim several of the eight slots.

How to use Color palette

  1. 1Drop the image onto the panel.
  2. 2Click Analyze.
  3. 3Copy the hex codes from the list. They are ordered by how much of the image each one covers.

What it won't do

  • Always eight colours, ordered by area, with no way to change the count.
  • Channels are rounded to a 32-step grid, so the hex values are approximations.
  • Samples every fourth pixel, so small colour accents can be missed entirely.

Common questions

How do I get a colour palette from an image?

Drop the image here and click Analyze — you get the eight most common colours as hex codes, ordered by how much of the picture each covers. The calculation runs on your device, which means you can do it with client artwork, unreleased designs or anything else you would not upload to a palette site.

Why don't the hex codes exactly match colours in the image?

Because each channel is rounded to the nearest multiple of 32 before counting. That grouping is deliberate: it collapses thousands of near-identical shades into a handful of families so the result is a usable palette rather than eight variations of one colour. For an exact value, sample the pixel with the eyedropper.

Can I get more than eight colours?

No, the list is fixed at eight. The workaround is to crop to the region you care about and analyse that instead, since the counts are recomputed over whatever image is loaded. Running it on a detail rather than the whole frame surfaces colours that the dominant areas were burying.

Does it ignore the background?

No, and the background often wins. Dominance is measured purely by pixel count, so a white product backdrop or a large expanse of sky can take most of the eight slots and leave the subject with one. Crop the background out first when the subject's colours are what you are after.

Related tools

Why this one doesn't upload your file

There is no server to upload to. This page is a static file, and the work happens in your browser using the same graphics and WebAssembly code that renders every other site you visit. Your file is read from disk into memory, processed, and handed back as a download. Once the page has loaded you can disconnect from the network entirely and it keeps working. The longer explanation

Install the app