Skip to content

Average & Dominant Colour

Returns one representative colour for an image — mean, median or most frequent — as a colour asset.

“What colour is this picture” has four defensible answers and they disagree, sometimes by a lot. This computes all four and says what each is good for, rather than picking one and calling it the average.

🔒 Runs entirely in your browsercoloraveragetheme

Drop an image

Four different answers to “what colour is this picture”, and why they disagree.

How to use it

  1. Drop an image

    It is decoded, sampled and measured; no output file is produced, because nobody downloads the picture they just dropped in.

  2. Take the dominant colour for a swatch

    It is the most populated region of colour space, refined to the mean of its members — the only one of the four guaranteed to be a colour the image actually contains a lot of.

  3. Take the linear mean for a background

    It is the colour of the light the image emits, so it is what matches an ambient glow or extends the picture off the edge of a canvas.

Common questions

Why are the two means different colours?

Because sRGB bytes are not proportional to light. Averaging the bytes averages through a concave curve, which pulls the result towards the dark end; averaging in linear light and converting back does not. The gap between them is shown as a number.

The average is a grey that is nowhere in my photo.

That is what a mean does to a picture made of two very different regions. Use the median, which is per channel and robust, or the dominant colour — both return something the image actually contains.

I need more than one colour.

The palette extractor quantises the image and reports every entry with its share, which is the right tool for a theme or a chart scale.

Feed it from

Next

These accept what this tool produces, so the result can go straight in.