Is there a way to obtain the average color of a selection?

I have a 600 by 600 image:

  • I use the color picker with Sample average and a 300px radius, I get a color: #657187
  • If I use Filter > Blur > Pixelize (600x600) and check the result , I also get #657187
  • If I scale down the image 1x1px using Linear interpolation, I get #5B667D
  • If I scale down the image 1x1px using Cubic interpolation, I get #697388
  • If I scale down the image 1x1px using NoHalo interpolation, I get #C7CACF
  • If I scale down the image 1x1px using LoHalo interpolation, I also get #C7CACF
  • If I use the histogram API to get the average of each of the R,G,B channels, and create a color from that, I get #516278

So, which is the “right” average (visually, NoHalo & LoHalo seem a lot too light) and how can I obtain it programmatically with the script-fu/python-fu API for an arbitrary shape (say, the selection)?

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.