Alright Ive looked at https://www.quora.com/Is-there-a-way-to-measure-color-saturation-in-Photoshop and read Color Theory: Is there a measurement of "colorfulness"? but need an applicable solution. In Photoshop (or another creative application) I dont know how to get the colorfulness of an image as a value.

I need to compare the colorfulness of multiple images, with black and white images scoring low and very saturated images scoring high.

I pulled up histograms of a light BW image (colorfulness should be low/zero):

enter image description here

And a dark BW image:

enter image description here

And a colorful image:

enter image description here

this is measuring the color channel as an average of the whole image, however the mean value doesn't help me here. The light BW image and the colorful image both score high due to luminosity I think, but the dark BW image is a low value.

How can I effectively measure/rank colorfulness of images?

  • 1
    You should be asking cognitive sciences as they are responsible for color science and they can have a better answer. You should inspect things in Lab space and measure the size of spread.
    – joojaa
    Jan 15, 2020 at 5:26

2 Answers 2


We have got two samples how the wanted colorfulness ranking method should work: Colorless BW photo should give a low number and a rainbow which has some colors which at least on a normal sRGB screen look quite bright and saturated should give a big number.

You have already got a hint to redirect your activity to a scientific website and to use CIELAB color system which is designed to be a math model of how colors are seen. RGB and its alternative formulations HSL and HSV (=HSB in Photoshop) present how colors are produced in computer screens.

The suggestion is not bad because most of us have quite thin understanding of the mathematical theory of color perception. We are more effective in making and mangling images and layouts.

But you will get a colorfulness ranking system. The next method calculates in Photoshop how colorful a RGB image is when it's compared to the maximum color producing capacity of the RGB system. It's not perceptual, it shows how high percentage of the color producing capacity is used.

It gives 100% if the image happens to have only maximally bright 100% saturated colors such as RGB=255,0,0 or RGB=255,255,0 or RGB=0,0,255.

Both reduced saturation and reduced brightness reduces the colorfulness in this ranking system. BW image has zero colorfulness.

These are achieved by multiplying the saturation with the brightness in every pixel and by calculating the average over the whole image.

An example:

enter image description here

This image has four equally sized areas. Red and yellow have both 100% saturation and brightness. So, they are both "100% colorful". The brighter cyan area has 100% brightness but only 50% saturation. The darker cyan area has 100% saturation, but only 50% brightness. So both cyan areas are "50% colorful". The average colorfulness is 75%.

Photoshop has HSB/HSL filter which extracts hue, saturation and brightness or luminance and places them to R,G and B channels of the image. NOTE: In legacy versions of Photoshop the filter is an optional download.

We extract with that filter H, S and B of our test image:

enter image description here

The color looks weird, but that's meaningless because R channel has hue, G has saturation and B has brightness. Saturation and brightness are copied to the clipboard one channel at a time and pasted as new layers on the top. See the disabled pasted layers in the layers panel.

WARNING: Turn the color management off (=none) in the Edit > Color settings dialog. Otherwise everything fails because the channels are handled as grayscale images and pasting them to a RGB image changes the brightness substantially if grayscale images are color-managed like they should be for printing.

The next step is to multiply the saturation and the brightness pixel by pixel:

enter image description here

The top layer has blending mode multiply. This image already shows the pixelwise colorfulness. The left half has 100% and the right half has 50% colorfulness.

Merging the layers and applying Filter > Blur > Average calculates the overall colorfulness. Picking the color with the eyedropper gives R=G=B=192 or as well the brightness=75% as expected:

enter image description here

I'm not a programmer but I guess programming this method to a script is an easy piece for programmers.

As said, this ranking method is not perception based. But in Lab color mode one in theory could present a subjectively more truthful colorfulness ranking method. A simple mode change doesn't work because Photoshop hasn't HCL (=the polar version of Lab color system "hue, chroma, luminance")nor channel decomposition filter for it. The job needs a programmer or a workaround must be found. I'll return and insert it if I find one.

  • Howabout. Convert LAB 16 bit, run 50% high abs with curves on A-B, add A and B to new channel now you have colorfullness squared. Than run levels to make it linear? Can easily be recorded as action.
    – joojaa
    Feb 4, 2020 at 7:34
  • @joojaa curves can be used. But I have read that HCL's C is sqrt(a^2+b^2) assuming that HCL means the cylindral version of Lab, not others which have got the same practical name. Abs isn't the same as square. Right? Other thing: Can you tell what blending mode Saturation means in Photoshop's Lab color mode? It could be useful.
    – user82991
    Feb 4, 2020 at 8:34
  • Well, you end up getting the squared distance from the calculation stage. But gamma of 2 is same thing as square root so no problemo.
    – joojaa
    Feb 4, 2020 at 13:49

I have no idea how to measure "colorfulness", but we can measure saturation. In fact, you used that word to describe what you need

with black and white images scoring low and very saturated images scoring high.

Here is the saturation channel of the first image, where you can only see the slight green tint of the histogram on the top-right:

enter image description here

And here is the saturation on the second image:

enter image description here

Now, that is something that you can measure with the method you already applied.

I used Corel PhotoPaint to split the HSB channels. You can use GIMP that has Decompose or extract Channels


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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