# 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 ! – Fabrice NEYRET Dec 26 '15 at 0:03

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

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. – Chameleon Oct 27 '14 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. – koocky Oct 27 '14 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 Jun 23 '20 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.