# How to calculate mean/average photo color in GIMP?

How to calculate mean/average photo color in GIMP?

I have some photo and want to calculate average color - how can I do it?

Actually it's very simple. If you open the Histogram tab, there are some basic statistics about the color values, such as mean, standard deviation and median.

Depending on the selected tab (RGB, Red, Green, Blue, Value) you'll get different statistics. If you want to know the average color, take the Mean from the three separate channel histograms and enter them in a color picker. You have one by clicking on the colored rectangle in the toolbar.

• note that it also adapt to the current selection. Very convenient ! Commented Dec 26, 2015 at 0:03
• In GIMP 2.10.22, the Histogram tool shows small decimal numbers for the Mead, Median, Std Dev. In the color picker, I had to multiply by 10. Commented Aug 10, 2021 at 18:27

Resize the image to 1x1 and see the color of the pixel you get. :)

• I compared the color obtained with this method vs. @clabacchio's answer to use the Histogram toolbox. The results were very similar #373983 vs #363b85 . YMMV: My source image was 177x177 of random blue pixels. I scaled the image to 1x1 with no interpolation. Commented Aug 10, 2021 at 18:32

Since most of all images are shown either in RGB or CMYK mode, calculating an average color value from there is difficult because you have 3 or 4 values per pixel. I would try to convert the image into HSV mode (Hue, Saturation, Value). There you have one specific color value for each pixel which is easier to calculate. See also here: Wikipedia Link HSL and HSV

I am not sure whether there is an option in Gimp to convert your file to this color space. I would try it with Matlab or maybe Octave (free).

• HSL/HSV space is not good for color processing - much better is CIE Lab or sRGB. More popular is sRGB. HSL is good for artists. Commented Oct 27, 2014 at 15:43
• Can you give some reasons why it is bad if you only use it for the purpose of calculating the average color ? I thought HSV is useful in industrial image processing since you have direct access to every color with one single value. Maybe I´m missing something. Commented Oct 27, 2014 at 20:24
• Old thread, but to answer the question of why averaging in HSB/HSV is not useful, how do you take the average of the hues 0° and 180°? There's no meaningful answer. Whereas if you take the average in an RGB space of #FF0000 and #00FFFF it's clear that the answer is #7F7F7F.
– GKFX
Commented Jun 23, 2020 at 16:38

Want something like this ,just figured by chance that you can use (linux only)GPick

go to tools -> Palette From Image ... -> pick the image and set number of colors to one this will give you the exact color if you try @clabacchio solution.