Average color of an image

Calculate the dominant average color of an image — useful for generating a matching background color or a loading thumbnail.

Example:

How it works

Building a site or app and want to automatically generate a background color that matches a photo (for example for a product card while the image is loading)? Upload the image and the tool averages all its pixels to give you a single representative color.

How is the average color calculated?

The tool adds up the red, green and blue values of every pixel in the image (or of a regular sample for very large images, to stay fast), then divides by the number of pixels analyzed to get an average per channel.

Does the result always match the visually "dominant" color?

Not exactly: an average can produce a dull color (grayish or brownish) if the image contains many very different colors, even if none of those colors actually appear in the image. It's a mathematical average, not a detection of the most frequent color.

100% local processing: the calculation is performed in your browser via our WebAssembly module — your image is never sent to a server.