• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

Photoshop - the "luminosity" blend mode

Doug Kerr

Well-known member
Many descriptions of the Granger Rainbow pattern state (or intimate) that "luminance" runs from 0-1 over the entire height of the pattern going from bottom to top (for the orientation of the sample we saw) and "saturation" runs from 0-1 over the entire height of the pattern going from top to bottom.

This is not so. "Luminance" is constant (at 100%) in the entire upper half, and declines to zero as we go from the "equator" to the bottom.

"Saturation" is constant (at 100%) in the entire lower half, and declines to zero as we go from the "equator" to the top.

In fact, what I have called "luminance" is actually the coordinate "B" ("brightness") of the Photoshop form of the "HSB" color space. What I have called "saturation" is actually the coordinate "S" ("saturation") of the Photoshop form of the HSB color space,

In the Photoshop form of the HSB color space, the coordinate B is defined as (if we ignore, for clarity, the need to convert from a 0-255 scale to a 1-100% scale):

B= max[C]/2​
where "max[C]" represents the maximum of R, G, and B.

The coordinate S is defined as (with the same proviso about scales):

S= (max[C]-min[C])/max[C]​
where "max[C]" represents the maximum of R, G, and B, and "min[C]" represents the minimum of R, G, and B.

The HSB color space is sometimes called the HSL (L="lightness") color space.

Note that not all forms of these color spaces use the same definitions of B (or L) and S.

I have not discussed the definitions of H ("hue") in terms of R, G, and B, which are complicated, owing to the angular, sectorized nature of the result, and again are not consistent over all forms of these color spaces.

These color spaces are primarily intended for use in "color choosers" in graphic applications, since they have a good relationship to the intuitive human views of color, in a "tidy" but imprecise form, ignoring the subtleties of how luminance (for example) really works.

They are of course not attractive for use in a (you should pardon the expression) "scientific" context.

Best regards,

Doug
 

Asher Kelman

OPF Owner/Editor-in-Chief
Doug,

I was following along until post #60 when I perked up with your nice description of the bicone model that you feel should really be a cone for the lower values of "luminance" resting on a cylinder of low values values as it was amusing and fun to consider.

With post # 61, my eyes glazed over and I felt I need a picture again!


Northlght Images test charts includes this:

"Granger rainbow - note that this has seriously out of gamut colours and will never look smooth on any output device."

So I wonder why you like this test chart? What's its practical use if it will never look smooth?

Will try to get back on the train in the morning!

Asher

The article below explains how to make it, but use with care!"
 

Doug Kerr

Well-known member
Hi, Asher,

Doug,

I was following along until post #60 when I perked up with your nice description of the bicone model that you feel should really be a cone for the lower values of "luminance" resting on a cylinder of low values values as it was amusing and fun to consider.

With post # 61, my eyes glazed over and I felt I need a picture again!

I understand. Let me try and make a picture.

By the way (and I didn't reveal this in my note here) the actual solid that shows the sRGB gamut in HSB coordinates is a hexagonal pyramid (rather than a circular cone) atop a hexagonal prism (rather than a circular cylinder).

This whole matter is discussed in excruciating detail in my article, "The HSV and HSL Color Models and the Infamous Hexcones", available here:

http://dougkerr.net/Pumpkin/index.htm#HSV-HSL

But, although it is often said that HSL and HSB refer to the same color space, that is not a "singular" color space. In fact, the HSB color space used in Photoshop is not the same as the HSL color spaces discussed in that article. I probably need to expand it to deal with that. (As you can see if you peek at the article, that will be way tedious!)

Thus, there is no picture of a hexagonal cone atop a hexagonal prism in the article at present!

Northlght Images test charts includes this:

"Granger rainbow - note that this has seriously out of gamut colours and will never look smooth on any output device."
Curiously enough, what I has planned to do first thing this morning was to comment on that statement! It was nice to find your comment when I arose!

That statement is just wrong - the Granger Rainbow of course does not contain any colors that are out-of-gamut in the color space in which it is represented (often sRGB). There can be no such thing.

What is presumably meant is that it may well contain colors that are out of the gamut of a particular display or printer, which may not embrace the entire sRGB gamut.

The second point I intended to make is that, contrary to some beliefs, the Granger Rainbow does not contain every color in the gamut of its color space. It does not, for example, contain any color for which both B ("quasi-luminance") and S ("quasi-saturation") are less than 100%. That is a vast region of the sRGB gamut.

What it does contain is all the colors along the "faces" of the three-dimensional figure that represents the sRGB gamut in a color space such as CIE x-y-Y (or, in fact, Photoshop HSB).

We can therefore think of it as "pressing the limits" of the gamut of an actual device. Thus it can (maybe) visually reveal the impact of the device gamut "restriction" of the sRGB gamut.

Bart reminds us that device drivers (or profile-aware applications) can deal with that challenge in different ways, and we often have the choice between several "strategies" for doing so (the so-called rendering intents). As a result, a rendering on a device with a gamut substantially smaller than the sRGB gamut may still look "smooth" (but may not be "accurate").

Best regards,

Doug
 

Doug Kerr

Well-known member
Hi, Asher,

Well, I shouldn't have started to fool around with this stuff not fully prepared!

In fact, the gamut of an RGB color space, presented in Photoshop SGB coordinates, is not a cone atop a cylinder - it is just a cylinder.

I mentioned that in models that presented as a cone atop a cylinder, the fact that the radius (representation "saturation") had a declining range as we went up in "luminance" is that, as we approach maximum luminance (even in a special simplified meaning of luminance), we can no longer get much saturation. For example, we might imagine that RGB=255,255,255 is a "maximum luminance" color. Well, in fact, it is the only maximum luminance color. And it is white which, for any credible definition of "saturation", has zero saturation.

The "hottest" colors that would have 100% saturation (in a meaning that is sensible in the RGB context) would have only one of the three coordinates at 255 and the others zero. And all those colors have substantially lower luminance. So they would not help form a "point" at the top of the figure.

Thus the "cone" can have some meaning in a situation where we are speaking of something really like luminance as our vertical axis, and something like saturation as the radial axis.

But in fact, if we use actual luminance, and actual saturation, we don't get something so tidy.

But now let's consider the coordinate system I was trying to work in - the Photoshop HSB ordinate system. There B, the vertical coordinate, is the maximum of R, G, or B. If any of the three has value 255, it scores as "B= 100%" - it plots at the top of the figure.

So, at the very top of the figure, we can have RGB=0,0,255, which has 100% saturation, as well many other colors with high saturations. Of course its actual luminance is greatly smaller than, for example, 255,255,255, so it really has no business "on the top of the figure". But it earns that position by virtue of the (bizarre) Photoshop definition of "B".

So, in fact, in the gamut of an RGB color space, we have colors that, plotted in Photoshop HSB coordinates, can have any combination of H=0 through 360°, B=0 through 1, and S= 0 through 1. And that constitutes a circular cylinder.

What does that help us to visualize about the gamut of an RGB color space? Not a thing. And in fact foiling around with three-dimensional plots of the misbegotten "HS-" family of coordinate systems is very dangerous - as you can see, it sure got me screwed up, of all people!

So I apologize for having raised the issues of cones and cylinders at all, and for given so much detailed misinformation.

I do plan shortly to present some accurate (and hopefully, useful) information about the gamuts of the sRGB color space.

But just now, Carla reminds me it's time to sit on my foot massage machine for a while (looking to overcome the trend toward lower extremity neurology that attends my current diabetes).

Later.

Best regards,

Doug
 
"Granger rainbow - note that this has seriously out of gamut colours and will never look smooth on any output device."

So I wonder why you like this test chart? What's its practical use if it will never look smooth?

Hi Asher,

First of all it's important to realise it will "never look smooth on any output device". Second it is a great tool to test how the rendering intent of one's colorspace copes with those out of gamut colors. One just assigns a profile and it will indicate the trouble areas of rendering with that profile. An example is to judge the smoothness of certain tones in (inkjet) output. Some profiles work better in the smoothness of greens, and others are better in blues, while others maintain the saturation better at the expense of yet someyhing else. There are no free lunches, but some taste better than others.

Cheers,
Bart
 

Doug Kerr

Well-known member
Hi, Bart,

Hi Asher,

First of all it's important to realise it will "never look smooth on any output device".
I'm not sure I know what "looks smooth" is supposed to mean.

When I look at the Granger Rainbow through a non-profile-aware viewer on my $200.00 ViewSonic monitor, I don't see anything that strikes me as being "discontinuities" or "banding" or such. But I'm not experienced in examining such things.

I don't know if that monitor accommodates the entire sRGB gamut or not. I guess I could tell by examining its profile (made here) with the right tool. What's a handy one for that?

Thanks.

Best regards,

Doug
 
Hi, Bart,


I'm not sure I know what "looks smooth" is supposed to mean.

When I look at the Granger Rainbow through a non-profile-aware viewer on my $200.00 ViewSonic monitor, I don't see anything that strikes me as being "discontinuities" or "banding" or such. But I'm not experienced in examining such things.

Try Photoshop, and "assign" an sRGB profile, through the edit menu. When forcing a known colorspace on data, decisions will have to be made by the software on how to map the out-of-gamut colors back into the gamut of the profile, AKA the "rendering intent".

I don't know if that monitor accommodates the entire sRGB gamut or not. I guess I could tell by examining its profile (made here) with the right tool. What's a handy one for that?

One free on-line service I use for comparing profiles is: http://www.iccview.de/content/view/3/7/lang,en/ . You may need to allow installation of a VRML control to allow viewing a 3D model of the colorspaces.

You can use the available ones or upload your own for comparison (the active ones are usually available in one of the Windows subdirectories (varies a bit per OS version), but you can also do a file search for the .ICC and or .ICM file extentions which will turn up some e.g. in Adobe subdirectories).

Cheers,
Bart
 

Doug Kerr

Well-known member
Hi, Bart,

Try Photoshop, and "assign" an sRGB profile, through the edit menu. When forcing a known colorspace on data, decisions will have to be made by the software on how to map the out-of-gamut colors back into the gamut of the profile, AKA the "rendering intent".

Well, my Photoshop working color space is already sRGB, so when I assign the Granger Rainbow file the sRGB color space profile, nothing changes on screen.

Now if I assign it some other profile (perhaps Adobe RGB), leaving my working space at sRGB, then PS will have to "convert" it to sRGB (when the matter of rendering intent would come into play).

Now I see some "unsmooth" aspects to the image.

Recall that this test file is not inherently in any specific RGB color space (it has no assumed "rendering") It is just a map of a lot of RGB values.

One free on-line service I use for comparing profiles is: http://www.iccview.de/content/view/3/7/lang,en/ . You may need to allow installation of a VRML control to allow viewing a 3D model of the colorspaces.

You can use the available ones or upload your own for comparison (the active ones are usually available in one of the Windows subdirectories (varies a bit per OS version), but you can also do a file search for the .ICC and or .ICM file extentions which will turn up some e.g. in Adobe subdirectories).
I'll look into that. Thanks.

Best regards,

Doug
 

Doug Kerr

Well-known member
Hi, Bart,

I tried ICCView, and it worked like a champ. Yes, I did have to install a VMRL doodad.

It shows that the gamut of my Viewsonic VX2035WM monitor (from the profile generated here with the Spyder3 system) is almost everyplace a little bigger than the sRGB gamut.

Thanks for the tip.

Best regards,

Doug
 

Doug Kerr

Well-known member
Someplace in my ramblings (as this thread wandered through blending, gradients, the curse of unrequited gray, RGB vs. rgb, two guitar tunin's, and the edge of a DPR-style catfight) I made mention of the distinction between chromaticity and chrominance, but without taking the time to "footnote" the distinction. Let me do that now. I'm afraid it is a pretty big "footnote" - brief explanations just don't cut it, and leave the kind of misunderstandings we often encounter.

Luminance-chromaticity color spaces

One class of color space describes a specific color in terms of luminance and chromaticity.

Luminance is the property that tells us the "brightness" of the color (although the specific perceptual property "brightness" does not vary linearly with luminance, but they are related).

Chromaticity is the property that distinguishes "red' from "blue", and also "red" from "pink". It can be quantified in several ways; each involves two coordinates. Two ways are:

• In terms of the subordinate properties hue and saturation
• In terms of the CIE coordinates x and y

We do not (ordinarily) record images in any luminance-chromaticity color space.

Luminance-chrominance color spaces

Luminance-chrominance color spaces can be thought of, fancifully, as describing a color in terms of a recipe involving:

• A certain amount of "white" light (where white alludes to the reference white chromaticity defined for the specific color space)
• A certain amount of a "colorant" of a certain hue.

The amount of white light in the recipe (its luminance) is in fact equal to the luminance of the entire color being described. The description of the "colorant" is called the chrominance.

If the luminance of the white ingredient is the luminance of the entire color, it would seem that the colorant light does not add any to the luminance. How can that be? If it had zero luminance, it would seem that it would have no effect.

The answer is that this is all a mathematical fiction; we do not actually generate light based on this recipe, and these "colorant" lights cannot exist physically. The colorant, while it has a hue, and a "potency" (ability to affect the overall color), still has no net luminance of its own.

But we can "mix" it with the white ingredient using the normal mathematical relationships, and thus find out what physically realizable color would be meant by a particular "physically-impossible" recipe.

We do not record images in any true luminance-chrominance color space. However, a number of important color spaces essentially follow this basic concept (with some important "wrinkles" however, generally related to nonlinear coordinates). These color spaces include L*a*b, YCbCr, YUV (not uvY!), and YIQ (the color space of NTSC video).

The important difference

Suppose we have light of a certain color. We have in hand its description both in a luminance-chromaticity form (perhaps with coordinates luminance, hue, and saturation) and a genuine luminance-chrominance form (with coordinates I will call luminance, colorant hue, and "colorant potency" (you will see later why I shy away from any "correct technical" term for the latter).

Now suppose we "attenuate" the light by passing it through a one-stop "neutral-destiny filter", and consider the color of the resulting light, expressed in those same two forms.

• Luminance-chromaticity representation: The luminance is now half what it was before; the chromaticity (perhaps in terms of hue and saturation) is unchanged.

• Luminance-chrominance representation: The luminance is now half what it was before; the chrominance has the same hue but only half the "colorant potency".

A homey metaphor

We will use a metaphor involving the mixing of paint. Here, the quantity of paint will play the role of luminance, and the "color" of the paint will play the role of chromaticity (I know that doesn't seem quite right, but it the only way to make the story work!)

To make a gallon of paint of a certain "color", the store starts with a gallon of "white" paint and adds a prescribed colorant dose, perhaps 1 oz of lampblack and 1/2 oz of carmine.

To make a quart of paint of the same "color", the store starts with a quart of "white" paint and adds a colorant dose of the same ingredients, in the same proportion, but only 1/4 the size (1/4 oz of lampblack and 1/8 oz of carmine).

The "colorant dose" here plays the role of chrominance. For a given "color" (equivalent to chromaticity), its "potency" (total amount) must follow the amount of paint being made.

Names for chrominance coordinates

A problem is what name to use for the "potency" of a chrominance.

In the video field, the term "chroma" is often used to mean "the sort-of-chrominance aspect of a color in the YIQ color space". It has both a "potency" and a hue but the term is sometimes used to speak of just the "potency" (this generally being clear from the context).

Outside that field, the term "chroma" has been hijacked to mean the "potency" aspect of chrominance in a luminance-chrominance color space.

Thus, going back to our story of a color attenuated by a neutral-density filter, compared to the original color, for the modified color:

• The luminance is 1/2 what it was.
• The chromaticity is unchanged; the hue and saturation are unchanged
• The hue (one aspect of the chrominance) is unchanged; the chroma (another aspect of the chrominance) is 1/2 what it was.

The HS- color spaces

In some versions of some of the HS- family of color spaces (the bastard children of the color space family), as we "attenuate" a color (perhaps with a theoretical neutral density filter), B (its quasi-luminance) decreases, but H (the hue) and S remain unchanged. Thus, S is something like saturation.

In other versions, as we "attenuate" a color , B (its quasi-luminance) decreases, H (the hue) remains unchanged, but S decreases. In this case, S is something like chroma.

About L*a*b*

Suppose that we start with a certain color, and decrease its luminance while holding the "magnitude" of the chrominance (the "chroma" value) unchanged. The chromaticity will change (notably, the saturation will increase). To go to our homey metaphor, there is the same amount of lampblack and carmine in less white paint.

In the L*a*b* color space, L* is something like luminance (differing in its nonlinear nature and in some other subtle ways related to how that is done) and a* and b* describe something like chrominance (not chromaticity), again with wrinkles relating to nonlinearity.

As a result, two colors with different values of L* but the same values of a* and b* do not have the same chromaticity.


Best regards,

Doug
 
Top