New 58+ tools are now available — built to keep your workflow moving.

Image Color Palette Extractor: HEX Colors From Images

Extract the dominant colors from any image free. Get a ranked HEX palette with the percentage each color covers, ready to paste into a design tool.

A Admin 8 min read

An image color palette extractor reads a picture and lists the colors that dominate it as HEX codes, ranked by how much of the image each one covers. Upload a JPG, PNG, WebP, GIF or BMP up to 5 MB, choose how many colors you want, and the tool returns a palette such as #2F4858 — 31.4%. There is no download and no stored file: the image is analysed on the server and discarded.

That output is more useful than it first appears. A percentage tells you which color is the background and which are accents, which is exactly the distinction a design tool's automatic palette often blurs. If 70 percent of a photo is a muted blue-grey, that is your base. The bright orange at 4 percent is an accent, not a primary.

What the extractor actually does

The image is decoded, scaled down to a sample of at most 128 pixels on the long side, and every visible pixel is grouped into a color bucket. The pixels in each bucket are averaged, weighted by how visible they are, and the largest buckets are returned. The result is a ranked list of HEX values with the share of the image each represents.

The sampling step is why the tool stays fast on large images. It also smooths out noise: a photograph with millions of slightly different pixel values produces a stable palette rather than thousands of near-identical entries. Fully transparent pixels are ignored, and partially transparent pixels are weighted by how visible they are, so a faded overlay does not dominate the result.

One consequence is worth stating plainly: this is a dominant-color analysis, not a perceptual one. It groups similar colors and reports what covers the most area. It does not decide which combination is most attractive, and it does not produce a ready-made brand palette. It gives you the raw material.

How to extract colors from an image

  1. Open the color palette extractor.
  2. Choose an image up to 5 MB. JPG, PNG, WebP, GIF and BMP are accepted.
  3. Pick how many colors you want: 4, 6, 8, 10, 12 or 16. Six is the default and a good starting point.
  4. Press Run. The server samples the image and groups its visible pixels.
  5. Copy the HEX values from the result. Each line shows the color and its share of the visible image.

The result also reports the image dimensions and the number of unique colors sampled, which is useful for judging how complex the palette really is. A photo with 40,000 sampled colors and a flat illustration with 12 are different design problems.

How many colors should you ask for?

Colors Best for What to expect
4 A simple brand palette or a minimal illustration The background and the strongest accents
6 General use, default setting A balanced palette without much noise
8–10 Rich photos, gradient-heavy scenes More nuance, some near-duplicates
12–16 Detailed analysis, poster or artwork Many closely related shades

Six is a sensible default because it covers the main areas without producing five almost-identical blues. If you are building a UI, four or five colors is usually plenty; extra entries tend to be shading rather than distinct roles. If you are studying a painting or a photograph, a larger count reveals the transitions.

Reading percentages correctly

The percentage is the share of visible pixels in that bucket, not a measure of importance. A small, saturated accent can be visually dominant while covering only two percent of the image. A large, muted background can cover half the frame and still feel secondary.

A practical way to use the output:

  • The largest share is usually the background or the overall tone.
  • The next two or three are the main subject and supporting areas.
  • The smallest entries are accents, highlights or noise.

If the palette looks muddy, the image probably is. A photo taken in flat light genuinely has a low-contrast palette. The extractor is reporting that, not failing to find brighter colors.

Common problems and fixes

The palette has several nearly identical colors. That is common in photographs with gradients or soft light. Ask for fewer colors, or crop to a more specific area before extracting.

The background dominates everything. It often does. Crop tightly around the subject first using the image cropper, then extract from the cropped version.

Transparent areas affected the result. They should not: fully transparent pixels are ignored, and partial transparency is weighted. If the palette still looks off, flatten a copy against a known background and compare.

The upload is rejected. The limit is 5 MB, and only JPG, PNG, WebP, GIF and BMP are accepted. HEIC and AVIF need to be converted first.

The colors look different in my design tool. HEX is just a color value. Different displays, colour profiles and browsers render it slightly differently. Trust the value and check the final result in the target environment rather than comparing two screens side by side.

I need the palette as CSS or JSON. The result is plain text with one HEX value and percentage per line, which is easy to paste into a stylesheet or convert to variables. The tool does not emit a framework-specific theme file.

Tips for better palettes

  • Crop to the area you care about. A full photo includes sky, floor and shadows. The subject alone gives a more useful palette.
  • Remove a distracting background first. If the background is a large uniform colour, it will take the top spot. Crop or mask it out.
  • Ask for fewer colours than you think you need. Four well-separated colors are easier to use than twelve near-duplicates.
  • Treat the output as inspiration, not a brand system. A palette extracted from a photo does not account for contrast, accessibility or print.
  • Check contrast before using it in a UI. Two colors that look good together in an image may fail text-contrast requirements. The extractor reports colours, not accessibility.
  • Use a compressed source. The analysis samples a small version anyway, so a smaller file uploads faster without changing the result much. The Image Compressor can prepare one.

If you are building a visual identity

Extracted colors are a starting point. A real palette needs a dark and light version of each hue, a neutral scale, and enough contrast for text. The percentage ranking helps you decide which color should be the base rather than the accent, but the rest is design work.

For web projects, the same colors can carry into a favicon so the browser tab matches the site. The Favicon Generator takes one square image and produces the full set of icon sizes, including a multi-size .ico. It does not extract the palette for you, but the two tools are often used on the same brand asset.

Frequently asked questions

Is the image color palette extractor free?

Yes. There is no account and no charge. Upload an image, choose a color count, and read the result.

Does it store my image?

No. The picture is analysed on the server and then discarded. There is no download result and no stored copy. The palette is returned as text.

How are the percentages calculated?

They are the share of visible sampled pixels in each color bucket. Fully transparent pixels are excluded, and partially transparent pixels are weighted by their visibility. The largest value is the color covering the most area, not necessarily the most visually important one.

Why do I get slightly different colors each time?

For most images the result is stable because the image is sampled to a fixed maximum size before grouping. A different crop, a different color count, or a re-encoded source can shift the buckets slightly.

Can I extract colors from a transparent PNG?

Yes. Transparent areas are ignored, so the palette reflects the visible artwork rather than the empty canvas.

How many colors can I extract?

Between 2 and 16 through the service, with the page offering 4, 6, 8, 10, 12 and 16. Six is the default.

Bottom line

Use the extractor to find out what colors actually dominate an image, then decide which ones are worth keeping. The percentages are the useful part: they separate the base from the accents. Start with the image color palette extractor, crop to the subject if the background takes over, and treat the output as the beginning of a palette rather than a finished design system.

Was this helpful? Leave a like or tell us below.

Comments (0)

Be the first to share feedback on this post.

Related posts

View all