Doug Kerr
Well-known member
We often mention that chromaticity (one of the two major attributes of color) can be thought of in terms of two subordinate attributes, hue and saturation.
But if we wish to quantify color in that way (specify a color numerically), what metrics quantify hue and saturation? It tums out that there aren't any!
A while ago, in an article here, I discussed HSV and HSL color spaces, pointing out that any specific one is a transform of a certain RGB color space. (Or, the HSV and HSL color models are transforms - perhaps not precisely defined - of the RGB color model.)
One critic said he could not understand why (I) "seemed stuck in having to determine HSL values in RGB terms." (Well, gosh, that's how the guy that invented it saw it, and defined it!) He went on to imply that, if we had a particular color in mind, we could determine its H, S, and V coordinate without need to think of any particular RGB color space (or presumably using R, G, and B values as intermediate results).
That's not so, but that assertion gives me a great entry into the topic of this article.
There are a lot of things that suggest the assertion is not correct (or more accurately, isn't even meaningful). Here's one simple test before we move to serious work:
We have a color described by the HSV values 0, 0, 50. Since S=0, then the chroma (and the saturation) should be zero. This the color represented should be white Which white is that?
See the bottom for the answer.
A metric for hue
To first probe the credibility of the assertion, let's think only of one part of the matter - the HSV coordinate H (which we consider to essentially represent the "hue" of the color of interest). If the assertion is true, then we should be able to find the equations that define the relationship between h, the actual hue of the color, and H, the corresponding HSV coordinate.
But we soon find that this is a doomed errand, since there is no such parameter as h. That is, there is no standard numerical quantity that represents the hue of a color. (This is different from luminance, for which there is a standard definition.) No CIE color space, for example, has h as a coordinate. And there is no CIE definition of a "metric" for hue.
Now, we sometimes use the "next best thing", the concept of the "dominant wavelength" of a color. We can see the concept on Figure 1:
We see the CIE x-y chromaticity diagram, in which any point represents an explicit chromaticity. We are first interested in the hue of the color whose chromaticity is shown as point C1.
We draw a line from the point representing white (W) through the point of interest until it intersects the locus of spectral chromaticity (the "horseshoe"). We call the wavelength there the "dominant wavelength" of the color, and consider that to be a metric for its hue (h1 in this case).
But there are a few flies in the ointment.
We find one when we consider another color, C2. Here, the line does not intersect the horseshoe at all. It leaves the arena across the locus of spectral purples. By definition, there are no wavelengths associated with points on that line.
Or course, we could use the fractional distance of the intersection along that line to describe the hue in such cases. So we have a metric that works in units of wavelength for some cases and as a ratio in another. Not too cool.
Now, just what chromaticity do we consider "white"? Recall that there is no chromaticity that is inherently entitled to be called white.
In Figure 2, we see the result of choosing some other "white":
We see that now the indicated "dominant wavelength" is h1a rather than h1 - a dramatic difference. So we have a dramatically-different indication of the hue of the color C1.
Now, there are three different CIE chromaticity diagrams, x-y, u-v, and u'v'. If we do this exercise on each diagram, for the same color, and the same choice of "white", we will get three different dominant wavelengths - implying three different values of he.
So it does not seem credible that there is an inherent numeric metric that describes hue. (We could force an artificial one, though, by saying that it is to be measured on the CIE x-y chromaticity diagram, using CIE illuminant "E" as the white.)
But we can't convert from this to the HSV coordinate H. Why? Because H is defined in terms of the R, G, and B coordinates of the color, and those coordinates, for any given color, vary depending on the particular RGB color space we have in mind.
A metric for saturation
Now lets look into the matter of a numerical parameter for saturation. Again, we are hindered here in that the CIE (for example) does not give a quantitative definition of the attribute saturation.
As with hue, we use some pragmatic ways to fill that gap. A common one is seen on Figure 3:
We have our point of interest, chromaticity C. We draw a line from white, W (oh, boy, here's a problem already) through point C until it intersects the locus of spectral chromaticities. The color there (as we saw earlier) is considered to have the same hue as point C. And, as a "monochromatic", or "pure" chromaticity, we consider it to he ave highest saturation possible for that hue, which we may call 100%.
We then take the ratio of the distance k1 to the distance k2, and say that this (perhaps expressed in percent) is the metric for the saturation of the chromaticity C (and thus for any color that has that chromaticity).
Note that here the same notion is perfectly credible for "purples".
Now we can already see that there are two problems:
• It works differently is we choose a different "white".
• It works differently is we use q different chromaticity diagram.
Still, if we wanted to, we could define h as the ratio of k1 to k2, measured on the CIE x-y chromaticity diagram, with the point "W" being CIE illuminant E.
In other situations, we may use the outlook illustrated on Figure 4:
The principle here is the same as before, except now the "perimeter" (considers to be the locus of all colors whose saturation we call 100%) is the boundary of the chromaticity gamut for the color space we have in mind (!). In effect, we compare the "chroma" (distance from W) of the color of interest with the chroma of the most-saturated color we can represent in the color space.
Now, which of these gives the "right" answer? There is no right answer, since there is no inherent definition of a metric for saturation.
A challenge
Now. back to the assertion that for any color there is a unique description in terms of H, S, and V (not dependent on the choice of a specific underlying RGB color space, and without using R, G, and B values as intermediate results). I would like to see a description of how that transformation might be made. At the least, I would like to hear a rationale and "workflow" for deriving the necessary equations that transform a color's description, for example, in terms of the CIE coordinates X, Y, and Z, into the coordinates H, S, and V. At best of course would be the set of equations themselves.
Best regards,
Doug
Answer: the reference white of the RGB color space upon which this particular HSV color space is predicated.
Why is some particular RGB space involved? Because any given HSV space is defined in terms of the coordinates R, G, and B (presumably as pertains to some particular RGB color space).
But if we wish to quantify color in that way (specify a color numerically), what metrics quantify hue and saturation? It tums out that there aren't any!
A while ago, in an article here, I discussed HSV and HSL color spaces, pointing out that any specific one is a transform of a certain RGB color space. (Or, the HSV and HSL color models are transforms - perhaps not precisely defined - of the RGB color model.)
One critic said he could not understand why (I) "seemed stuck in having to determine HSL values in RGB terms." (Well, gosh, that's how the guy that invented it saw it, and defined it!) He went on to imply that, if we had a particular color in mind, we could determine its H, S, and V coordinate without need to think of any particular RGB color space (or presumably using R, G, and B values as intermediate results).
That's not so, but that assertion gives me a great entry into the topic of this article.
There are a lot of things that suggest the assertion is not correct (or more accurately, isn't even meaningful). Here's one simple test before we move to serious work:
We have a color described by the HSV values 0, 0, 50. Since S=0, then the chroma (and the saturation) should be zero. This the color represented should be white Which white is that?
See the bottom for the answer.
A metric for hue
To first probe the credibility of the assertion, let's think only of one part of the matter - the HSV coordinate H (which we consider to essentially represent the "hue" of the color of interest). If the assertion is true, then we should be able to find the equations that define the relationship between h, the actual hue of the color, and H, the corresponding HSV coordinate.
But we soon find that this is a doomed errand, since there is no such parameter as h. That is, there is no standard numerical quantity that represents the hue of a color. (This is different from luminance, for which there is a standard definition.) No CIE color space, for example, has h as a coordinate. And there is no CIE definition of a "metric" for hue.
Now, we sometimes use the "next best thing", the concept of the "dominant wavelength" of a color. We can see the concept on Figure 1:
We see the CIE x-y chromaticity diagram, in which any point represents an explicit chromaticity. We are first interested in the hue of the color whose chromaticity is shown as point C1.
We draw a line from the point representing white (W) through the point of interest until it intersects the locus of spectral chromaticity (the "horseshoe"). We call the wavelength there the "dominant wavelength" of the color, and consider that to be a metric for its hue (h1 in this case).
But there are a few flies in the ointment.
We find one when we consider another color, C2. Here, the line does not intersect the horseshoe at all. It leaves the arena across the locus of spectral purples. By definition, there are no wavelengths associated with points on that line.
Or course, we could use the fractional distance of the intersection along that line to describe the hue in such cases. So we have a metric that works in units of wavelength for some cases and as a ratio in another. Not too cool.
Now, just what chromaticity do we consider "white"? Recall that there is no chromaticity that is inherently entitled to be called white.
In Figure 2, we see the result of choosing some other "white":
We see that now the indicated "dominant wavelength" is h1a rather than h1 - a dramatic difference. So we have a dramatically-different indication of the hue of the color C1.
Now, there are three different CIE chromaticity diagrams, x-y, u-v, and u'v'. If we do this exercise on each diagram, for the same color, and the same choice of "white", we will get three different dominant wavelengths - implying three different values of he.
So it does not seem credible that there is an inherent numeric metric that describes hue. (We could force an artificial one, though, by saying that it is to be measured on the CIE x-y chromaticity diagram, using CIE illuminant "E" as the white.)
But we can't convert from this to the HSV coordinate H. Why? Because H is defined in terms of the R, G, and B coordinates of the color, and those coordinates, for any given color, vary depending on the particular RGB color space we have in mind.
A metric for saturation
Now lets look into the matter of a numerical parameter for saturation. Again, we are hindered here in that the CIE (for example) does not give a quantitative definition of the attribute saturation.
As with hue, we use some pragmatic ways to fill that gap. A common one is seen on Figure 3:
We have our point of interest, chromaticity C. We draw a line from white, W (oh, boy, here's a problem already) through point C until it intersects the locus of spectral chromaticities. The color there (as we saw earlier) is considered to have the same hue as point C. And, as a "monochromatic", or "pure" chromaticity, we consider it to he ave highest saturation possible for that hue, which we may call 100%.
We then take the ratio of the distance k1 to the distance k2, and say that this (perhaps expressed in percent) is the metric for the saturation of the chromaticity C (and thus for any color that has that chromaticity).
Note that here the same notion is perfectly credible for "purples".
Now we can already see that there are two problems:
• It works differently is we choose a different "white".
• It works differently is we use q different chromaticity diagram.
Still, if we wanted to, we could define h as the ratio of k1 to k2, measured on the CIE x-y chromaticity diagram, with the point "W" being CIE illuminant E.
In other situations, we may use the outlook illustrated on Figure 4:
The principle here is the same as before, except now the "perimeter" (considers to be the locus of all colors whose saturation we call 100%) is the boundary of the chromaticity gamut for the color space we have in mind (!). In effect, we compare the "chroma" (distance from W) of the color of interest with the chroma of the most-saturated color we can represent in the color space.
Now, which of these gives the "right" answer? There is no right answer, since there is no inherent definition of a metric for saturation.
A challenge
Now. back to the assertion that for any color there is a unique description in terms of H, S, and V (not dependent on the choice of a specific underlying RGB color space, and without using R, G, and B values as intermediate results). I would like to see a description of how that transformation might be made. At the least, I would like to hear a rationale and "workflow" for deriving the necessary equations that transform a color's description, for example, in terms of the CIE coordinates X, Y, and Z, into the coordinates H, S, and V. At best of course would be the set of equations themselves.
Best regards,
Doug
Answer: the reference white of the RGB color space upon which this particular HSV color space is predicated.
Why is some particular RGB space involved? Because any given HSV space is defined in terms of the coordinates R, G, and B (presumably as pertains to some particular RGB color space).