Is there a way to calculate the percentage of color that an image has? For example and image of a black and white chess board would show 50% black, 50% white. Is there a software program for that or an option in Adobe Photoshop?

  • 2
    Photoshop's Histogram already does this. – Ovaryraptor Mar 28 '18 at 20:18
  • @Ovaryraptor Well any packages histogram does it. However consider that color is not linear so its not accurate unless you first convert the data to linear ink coverage. – joojaa Mar 28 '18 at 20:41
  • That chessboard had better be aligned perfectly with the camera. Depending on the distance, it may have between 0% gray (as in your example) and 100% of 50% gray (when viewed from afar). If the Photoshop histogram is "too accurate", posterize the image first. – usr2564301 Mar 28 '18 at 20:43
  • 1
    RGB with each channel 0...255 has nearly 17 million different possible color combinations. Do you expect nearly 17 million percentage numbers (one for each possible color) which show how many percentages of the pixels have that color? Or do you want only one percentage "how colorful this image is?" – user287001 Mar 28 '18 at 22:16

Your Answer

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

Browse other questions tagged or ask your own question.