I want GIMP to calculate the average Hue, Saturation, and Value of a selection.

I could color pick several pixels from the desired area and read off the values from the FG/BG Colour tab. This would be wildly inefficient; I have to do around 100 of these.

Preferably, it would be automagic -- Reading off average RGB values and converting them to HSV would be acceptable, albeit suboptimal.

  • This probably should be tagged hsv but I don't have the reputation. – SIGSTACKFAULT Mar 9 '19 at 16:50
  • Given the fact that there are 0 questions with that tag, I wouldn't do it, anyway - HSV is part of image manipulation and not a topic that raises that many questions. However, the proper place to debate this would certainly be meta. – flolilo Mar 9 '19 at 17:00
  • 1
    Gimp. Science experiment involving colour. Feel free to migrate to superuser if it belongs better there. – SIGSTACKFAULT Mar 9 '19 at 17:11

Not exactly what you want to do but close:

In Gimp 2.10,

  • open the Histogram dialog (Windows>Dockable dialog>Histogram)
  • set it to Luminance
  • make a selection, and check the Average and Median values at the bottom of the dialog.


  • Install the ofn-average-fill script
  • Make your selections, and call the script (Edit>Fill with average color)(you can assign it to a keyboard shortcut). It will replace the selection by its average.
  • Use the Pointer dialog (Windows>Dockable dialog>Pointer) to read the value of the area.
  • Isn't luminance a separate thing from Saturation? (Or am I crazy?) – SIGSTACKFAULT Mar 9 '19 at 19:24
  • Yes, Luminance is only (close to) the "V" part of HSV; The second solution gives you more of HSV, but you don't get he median that is often useful. Also, the script would not be very difficult to modify to write the values to a file... – xenoid Mar 9 '19 at 20:22
  • Ended up using a modified version of ofn-average-fill. Will clean it up and comment here at a later date. – SIGSTACKFAULT Mar 10 '19 at 15:12

Second answer that could be faster:

  1. Color>Components>Decompose and select the color model (HSV, HSL...). This gives you an image with 3 layers, that represent the H, S, and V components of the original image.
  2. Start the Histogram dialog
  3. Make your selection, and read the value at the bottom of the dialog. Select the H, S and V layers in the Layers list to display the histogram for each in turn.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.