Dominant Color Extractor

Extract the dominant color from an image.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Choose an image and press Process to get one hex colour. It is the average of all the colours in the picture, which is a useful quick tint but not a palette.

How to use

1
Step 1
Choose an image.
2
Step 2
Press Process.
3
Step 3
Copy the hex code.

How it works

The image is shrunk to a 32 by 32 sample and the red, green and blue values of all pixels are averaged. The result is formatted as a hex colour such as #8a6f4e. Because it is a mean, a picture of bright red and bright blue averages to a purple that is not in the image.

R = average of all red values (likewise G and B), shown as #RRGGBB

Worked example

A sunset

Input
sunset.jpg
Output
one hex code such as #8a6f4e
Walkthrough
The warm and dark areas are averaged into a single mid-tone.

Limitations

  • Returns the mean colour, not the most common colour.
  • One colour only; no palette.
  • Transparent pixels are averaged as their stored colour values.

Questions

How do I find the main colour of an image?
Choose it and press Process for the average colour.
Is this the most common colour?
No. It is the average of all pixels.
Can it give me a palette?
No, only one colour.

Features

  • Average colour as hex
  • 32 × 32 sample
  • Private, in-browser

Guides

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Reduce image size with srcset

    Chrome for Developers

    Serving the right resolution—the goal of resize/compress tools.

    Watch on YouTube
  • How Image Compression Works

    Leo Isikdogan

    Compression intuition for resize and optimize image tools.

    Watch on YouTube