Map Extract
Free tool

Find the average colour of an image

Choose a picture and get the single colour you would see if every pixel were blended together. It comes as HEX, RGB and HSL codes, with the closest named CSS colour and a swatch beside your image.

Runs in your browser. Nothing you enter is uploaded.

Getting the average colour

  1. Choose an image

    Pick a JPG, PNG, WebP or other picture your browser can open, up to 12,000 pixels on a side.

  2. Read the codes

    The swatch and four results appear at once: HEX, RGB, HSL and Nearest CSS name, marked exact when the average matches a named colour precisely.

  3. Copy what you need

    Copy HEX, Copy RGB and Copy CSS put the value, or a full background-color line, on the clipboard.

Example: why a two-colour logo averages to something else

A designer pitching a new website to a printing firm wants a page background that sits well with the client's logo, which is half bright red and half bright blue. She expects the average to be one of the two.

It is neither. Red (255, 0, 0) and blue (0, 0, 255) in equal amounts average to 128, 0, 128, which is exactly the CSS colour purple. That is useful to know: the average colour describes the overall tone of a picture, not its main brand colour. For the separate colours, use the colour extractor instead.

Input
A logo that is 50% #FF0000 and 50% #0000FF
Result
HEX #800080
RGB rgb(128, 0, 128)
HSL hsl(300, 100%, 25%)
Nearest CSS name purple (exact)

How the average is worked out

Each pixel's red, green and blue values are added up and divided by the number of pixels counted. Large images are first scaled so the longer side is 1,000 pixels, which makes the result quick without changing it in any meaningful way; the note under the codes says when that happened.

Pixels that are mostly transparent are left out, so a logo on a see-through background averages only the logo itself. A picture that is completely transparent has no average, and the tool says so rather than inventing one.

  • Photos with a lot of sky, wall or table tend to average towards a dull grey or beige. Crop to the subject first for a more telling colour.

Questions people ask

What is the average colour of an image used for?

It gives a calm background or placeholder that matches a picture, for example the colour shown while a product photo loads, a panel behind a client's logo in a proposal, or the tint of a social post template. It is also a quick way to compare the overall tone of several photos.

Is the average colour the same as the dominant colour?

No. The dominant colour is the one covering the most area; the average mixes every colour together. A red door on a white wall has white as its dominant colour, while the average is a pale pink that appears nowhere in the photo. For the main colours in a picture, the colour extractor gives a palette.

Why is the result greyer than I expected?

Mixing many colours pulls the result towards grey or brown, as mixing paints does. A busy photo, or one with a lot of neutral background, averages out muddy, so crop to the area you care about first.

Where your data goes

The picture is opened and its pixels are averaged inside your browser. The image file is never uploaded, so client logos and product photos stay private.

Checked against the tool on

Top