• 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!

The color gamut of the sRGB color space

Doug Kerr

Well-known member
Often, we see a CIE x-y chromaticity diagram with the chromaticities of the three sRGB primaries ("R", "G", and "B") plotted.

Often these are joined with straight lines to form a triangle, which we hear "bounds the gamut of the sRGB color space". But that is not really so.

That gamut must be represented in three-dimensional space; this triangle shows only the chromaticity gamut for a range of small (but non-zero) luminances. At the other extreme, for a relative luminance of 1.0, the chromaticity gamut is only a point (at the white point of the color space on the chromaticity plane).

This figure is an oblique view of the three-dimensional solid that shows the color gamut of the sRGB color space as "plotted" in the CIE x-y-Y color space.

srgb_gamut.-02-02.gif


Two faces are arbitrarily shaded to help us grasp the peculiar shape. They have no special significance.

The x and y coordinates of this are the same as the coordinates of the familiar x-y chromaticity diagram, while the Y axis represents relative luminance.

The primaries are labeled Ro, Go, and Bo here since we will have plenty of other R's, G's, and B's.

We might expect the figure to be roughly symmetrical, but it isn't, mostly because of the different impact of the three primaries on luminance (reflecting the eye's varying sensitivity as a function of wavelength).

The point labeled Bsat is the color 0,0,255. This is the highest luminance fully-saturated "blue" we can represent in sRGB. Its luminance isn't very high (0.072); the B primary doesn't have much "leverage" on luminance.

If we wanted a color of any higher luminance, since B is already "wide open" (255), we would have to add R and/or G. And that would "dilute" the saturation of our "blue".

Up to the luminance of Bsat, the cross-section of the figure is the same as the low-luminance chromaticity gamut. But above that luminance (for the reason we discussed just above), the "B" edge starts to fall back toward the "center pole" (the vertical line through the chromaticity of the sRGB white point, Wo). Above this luminance, we can no longer have a "maximum saturation blue".

The point marked Rsat (255,0,0) is the highest-luminance fully saturated "red" we can have. The story is like the story for Bsat. At this point, the "R" edge of the solid stats to fall back to the center pole. Above this luminance (0.213), we can no longer have a "maximum saturation red".

Finally, the point marked Gsat (0,255,0) is the highest-luminance fully saturated "green" we can have. The story is like the story for Bsat and Rsat. At this point, the "G" edge of the solid stats to fall back to the center pole. Above this luminance (0.715), we can no longer have a "maximum saturation green".

From this point up, the solid is a triangular pyramid. When we reach luminance 1.00, all three edges have "fallen to the center pole", converging at the point 255,255,255, "wide-open white", the largest luminance we can have, at which point the only available chromaticity is reference white.

Note that there is no axis on this representation that indicates true colorimetric saturation (nor any of the pseudo-saturation values found in such color spaces as HSL, HSV, and HSB, nor even the RGB-oriented "saturation relative to the maximum for this hue" ).

Best regards,

Doug
 

Doug Kerr

Well-known member
Erratum - what, again?

Well, it seems that all I do these days is issue corrections on my various dissertations.

For my note at the head of this thread, I drew the figure from my "catalog". It had been prepared a while ago in connection with another project. I updated some of the annotations and let 'er rip.

Later, I took a close look at it and realized it was not correct at all. I had based it on an overly-simplistic model of the situation.

I've undertaken the preparation of a correct figure. It is a gigantic job, the first part being to be sure I had the correct "vision" of the three-dimensional figure. Then all the critical points (where lines bend and so forth) have to be reckoned. Finally, the actual drawing has to be made, with due attention to graphic conventions to help the reader grasp this complicated three-dimensional figure from a two-dimensional drawing.

Fortunately, I have some good tools to help with the dog work, including a spreadsheet for calculating, from sRGB R,G,B values, various other parameters of a color space point (such as r,g, b, and y), and a spreadsheet that does for me the transformation to the oblique projection in which the drawing is made (you enter the x, y, and z coordinates of a point in the three-dimensional space being illustrated and it gives the "graphic" x and y coordinates on the "canvas").

I hope to have the new, correct illustration ready within the next day or so. In the meantime, I have left the other one in the post as is, other than for an overlay warning that it is incorrect and under revision.

My apologies for this gaffe.

Best regards,

Doug
 

Doug Kerr

Well-known member
Well, here is the next crack at the figure illustrating the gamut of the sRGB color space, shown in the CIE xyY color space.

I'm not comfortable that it is entirely correct yet, but I think this is a good start.

I will give the whole explanation here, since some of the text changes to suit the new illustration.

***************

Often, we see a CIE x-y chromaticity diagram with the chromaticities of the three sRGB primaries ("R", "G", and "B") plotted.

Often these are joined with straight lines to form a triangle, which we hear "bounds the gamut of the sRGB color space". But that is not really so.

That gamut must be represented in three-dimensional space; this triangle shows only the chromaticity gamut for a range of small (but non-zero) luminances. At the other extreme, for a relative luminance of 1.0, the chromaticity gamut is only a point (at the white point of the color space on the chromaticity plane).

This figure is an oblique view of the three-dimensional solid that actually shows the color gamut of the sRGB color space as "plotted" in the CIE x-y-Y color space.

srgb_gamut_03-v01.gif


The figure is in "wireframe" style; all "hidden lines" are visible.

All the "front" faces are arbitrarily shaded (in alternating shades) to help us grasp the peculiar shape. The shading has no other special special significance.

It can be helpful establishing your visualization to recognize that the surface marked with the circled "0" is wholly vertical (an upward extrusion of the B-R line on the "base plane").

The x and y coordinates of this are the same as the coordinates of the familiar x-y chromaticity diagram, while the Y axis represents relative luminance.

The primaries are labeled Ro, Go, and Bo here, since we will have other R's, G's, and B's.

We might expect the figure to be roughly symmetrical, but it isn't, mostly because of the different impact of the three primaries on luminance (reflecting the eye's varying sensitivity as a function of wavelength).

The point labeled Bsat is the color 0,0,255. This is the highest luminance fully-saturated "blue" we can represent in sRGB. Its luminance isn't very high (0.072); the B primary doesn't have much "leverage" on luminance.

If we wanted a color of any higher luminance, since B is already "wide open" (255), we would have to add R and/or G. And that would "dilute" the saturation of our "blue".

Up to the luminance of Bsat, the cross-section of the figure is the same as the low-luminance chromaticity gamut. But above that luminance (for the reason we discussed just above), the "B" "edge" starts to fall back toward the R and G "poles" . Above this luminance, we can no longer have a "maximum saturation blue". The "fallback" is along the sloping plane marked with a circled "1".

The point marked Rsat (255,0,0) is the highest-luminance fully saturated "red" we can have. The story is like the story for Bsat. At this point, the "R" edge of the solid stats to fall back toward the "G" and "B" "poles". Above this luminance (0.213), we can no longer have a "maximum saturation red". The "fallback" here is along the sloping plane marked with a circled "2".

Finally, the point marked Gsat (0,255,0) is the highest-luminance fully saturated "green" we can have. (It is on the back side of the figure.) The story is like the story for Bsat and Rsat. Above this luminance (0.715), we can no longer have a "maximum saturation green".

From about this point up, the solid is a triangular pyramid. When we reach luminance 1.00, all three edges have "fallen to the center pole", converging at the point 255,255,255, "wide-open white", the largest luminance we can have, at which point the only available chromaticity is reference white (Wo).

Note that there is no axis on this representation that indicates saturation under either of teh two recognized defintions (nor any of the pseudo-saturation values found in such color spaces as HSL, HSV, and HSB).

Determining rigorously, visualizing, and presenting the shape of this solid has been a very challenging effort. I am still not comfortable that I yet have all the details right. I will do some further work on that after I catch up on the rest of my life.

Best regards,

Doug
 

Joachim Bolte

New member
Hi Doug,

Had a little chat with Asher, and decided to look some more on the forum.

Thank you for your scheme. i was wondering: The shape is no pyramid. If you plotted the secundary colors into there (255,255,0 for yellow, 255,0,255 for magenta and 0,255,255 for cyan), whould they be at the points where the lines between the primaries 'bend'? If I understand the xyY space correctly, the Y-value of yellow would be the composite of the Y-value for green and red, and so yellow should be very high on the Y-scale.

And shouldn't there also be a blackpoint to complete the shape downwards? RGB 0,0,0 would be 0,0,0 in xyY I suppose, but RGB 1,1,1 should fall right beneath the whitepoint if I am correct.
 

Doug Kerr

Well-known member
Hi, Joachim,

Had a little chat with Asher, and decided to look some more on the forum.
Good. I look forward to working with you. I enjoy your coupled interests in the "technical" and "subjective" aspects of our craft.

Thank you for your scheme. i was wondering: The shape is no pyramid. If you plotted the secundary colors into there (255,255,0 for yellow, 255,0,255 for magenta and 0,255,255 for cyan), whould they be at the points where the lines between the primaries 'bend'?
I had considered showing the locations of these three "secondary" colors but didn't. I should perhaps do that. Yes, I would expect them to be at some kind of unique place in this figure. (I'd best not here guess just where; I'll wait until I get them plotted!)

If I understand the xyY space correctly, the Y-value of yellow would be the composite of the Y-value for green and red, and so yellow should be very high on the Y-scale.

Quite so. For Y (255,255,0), the value of Y is 0.9278.

And shouldn't there also be a blackpoint to complete the shape downwards?
"Black" is a unique creature. It does not correspond to a unique point in the three-dimensional x-y-Y space.

Actually, the entire plane Y=0 corresponds to black, or at least the portion of it within the "low luminance chromaticity gamut". But x and y are really undefined for black.

RGB 0,0,0 would be 0,0,0 in xyY I suppose, . . .

For RGB 0,0,0, Y=0 but x and y are undefined. (In the equations for x and y as functions of R,G,B, in this case there is zero in the denominator!)

but RGB 1,1,1 should fall right beneath the whitepoint if I am correct.
Quite so. In the case of sRGB, they are both at x,y = 0.313, 0.329.

Post script: A quick look at plotting "yellow" on the figure reveals a significant flaw in its "penthouse" area (which in fact you probably recognized intuitively).

I need to do some further work on the whole thing!

Best regards,

Doug
 

Joachim Bolte

New member
is this helpfull? quicky in AutoCAD... it's a 3d model, so I'm pretty sure the coordinates are displayed correctly. To make it a little clearer, I gave the lines from the primaries and secundaries to the white and black a color.
2ibkpie.jpg
 
Last edited:
Post script: A quick look at plotting "yellow" on the figure reveals a significant flaw in its "penthouse" area (which in fact you probably recognized intuitively).

I need to do some further work on the whole thing!

Hi Doug, Joachim,

It is very difficult to plot in 2D. You can look at a 3D model at :
http://www.iccview.de/content/view/13/15/lang,en/

One can do a more specific comparison by using or uploading some profiles.

It may require the installation of the VRML control which is going to be installed automatically if allowed. The VRML control will allow to drag/rotate the model and see it from all sides in simulated (but not accurate) colors. When you click the "right" mouse button, you'll get a toolbar which will allow to zoom and do other stuff.

That comparison also shows the differences between a CMYK and an RGB colorspace. While they largely overlap, there is also a number of saturated colors that cannot be encoded in the other space without loss of saturation.

Another thing to note is that the definition of the colorspace will most likely only be used partially by a real image, e.g. a red tomato on a red background will not have much green or blue saturated content, so part of the space is only used for an individual image. The importance of that will become clearer when looking at larger colorspaces, such as ProPhoto RGB (which theoretically even allows to encode non-existing colors).

Cheers,
Bart
 

Doug Kerr

Well-known member
Hi, Bart,

Hi Doug, Joachim,

It is very difficult to plot in 2D. You can look at a 3D model at :
http://www.iccview.de/content/view/13/15/lang,en/

As near as I can tell so far, this tool only allows gamuts to be "seen" as they would be "plotted" in the L*a*b* coordinate system.

In that coordinate system, we do not get any direct insight into chromaticity.

My interest was to present the sRGB gamut in the xyY coordinate system.

I had a gamut viewer once that was more flexible in that regard, but I'm not sure what it was. I think it may have been a "non-freeware" machine whose trial period has now (long) expired. If that's so, I may looking into reviving it.

Best regards,

Doug
 

Doug Kerr

Well-known member
Well, hopefully I have finally got it! It is really very simple, but it took me lot of mental struggle to be sure it was that simple!

I will again give the whole explanation here, since some of the text changes to suit the new illustration.

***************

Often, we see a CIE x-y chromaticity diagram with the chromaticities of the three sRGB primaries ("R", "G", and "B") plotted.

Often these are joined with straight lines to form a triangle, which we hear "bounds the gamut of the sRGB color space". But that is not really so.

That gamut must be represented in three-dimensional space; this triangle shows only the chromaticity gamut for a range of small (but non-zero) luminances. At the other extreme, for a relative luminance of 1.0, the chromaticity gamut is only a point (at the white point of the color space on the chromaticity plane).

This figure is an oblique view of the three-dimensional solid that actually shows the color gamut of the sRGB color space as "plotted" in the CIE x-y-Y color space.

srgb_gamut_04-V01.gif


The figure is in "wireframe" style; all "hidden lines" are visible. To help visualize the figure:

• The "left rear" faces are colored cyan and dark cyan.
• The "right rear" face is colored yellow.
• The front faces are clear but are outlined in heavy lines.
• The "left" face is crosshatched (so that the left rear faces can be seen through it).

The x and y coordinates of this are the same as the coordinates of the familiar x-y chromaticity diagram, while the Y axis represents relative luminance.

The primaries are labeled Ro, Go, and Bo here, since we will have other R's, G's, and B's.

We might expect the figure to be roughly symmetrical, but it isn't, mostly because of the different impact of the three primaries on luminance (reflecting the eye's varying sensitivity as a function of wavelength).

The point labeled Bmax is the color 0,0,255. This is the highest luminance fully-saturated "blue" we can represent in sRGB. Its luminance isn't very high (0.072); the B primary doesn't have much "leverage" on luminance.

If we wanted a color of any higher luminance, since B is already "wide open" (255), we would have to add R and/or G. And that would "dilute" the saturation of our "blue".

Up to the luminance of Bmax, the cross-section of the figure is the same as the low-luminance chromaticity gamut. But above that luminance (for the reason we discussed just above), the "B" "edge" starts to fall back toward the R and G "poles" . Above this luminance, we can no longer have a "maximum saturation blue". The "fallback" is in fact along the crosshatched surface.

The point marked Rmax (255,0,0) is the highest-luminance fully saturated "red" we can have. The story is like the story for Bmax. At this point, the "R" edge of the solid stats to fall back toward the "G" and "B" "poles". Above this luminance (0.213), we can no longer have a "maximum saturation red".

Finally, the point marked Gmax (0,255,0) is the highest-luminance fully saturated "green" we can have. (It is on the back side of the figure.) The story is like the story for Bmax and Rmax. Above this luminance (0.715), we can no longer have a "maximum saturation green".

Near the peak, the solid is a triangular pyramid. When we reach luminance 1.00, all edges have "fallen to the center pole", converging at the point 255,255,255, "wide-open white", the largest luminance we can have, at which point the only available chromaticity is reference white (Wo).

Note that there is no axis on this representation that indicates saturation under either of the two recognized definitions (nor any of the pseudo-saturation values found in such color spaces as HSL, HSV, and HSB).

Best regards,

Doug
 

Doug Kerr

Well-known member
Hi, Joachim,

is this helpfull? quicky in AutoCAD... it's a 3d model, so I'm pretty sure the coordinates are displayed correctly.
2ibkpie.jpg

I would expect so. I trust you have the functions needed to convert R,G,B to x,y,Y.

To make it a little clearer, I gave the lines from the primaries and secundaries to the white and black a color.

Very nice execution, and visually easy to grasp. Well done.

I'm not sure it describes the actual solid (although I'm certainly not fully comfortable with my grasp of that either).

Rather, I think the the edges of the solid are between nodes as I will list shortly. Regarding notation: Ro, Bo, and G, are the chromaticities of the three primaries plotted on the plane Y=0.; colors with the "max" subscript are the hottest possible RGB value for that chromaticity (all values either 255 or zero).

Trivial edges, lying along the base plane, included just for completeness:

Ro-Go, Go-B0, B0-Ro

First "risers":

Ro-Rmax, Go-Gmax, Bo-Bmax

Second "risers":

Rsat-Msat, Rsat-Ysat; Gsat-Ysat, Gsat-Csat; Bsat-Csat, Bsat-Msat

To the pinnacle:

Cmax-Wmax; Mmax-Wmax, Ymax-Wmax

I do not endorse "black" as a node, since there is no singular point in xyY space that qualifies as such. I am not taken by arguments that the point whose x,y values are the same as for the the white point but with Y=0 is such a point. But if one feels the need to illustrate it, that is probably as good a point as any. I will not comment on the edges that should lead from it to vertexes of the solid.

If you are willing to stipulate to my topological description, I would enjoy a rendering of it in that same style.

And of course if you have any arguments that counter my current topological model, I'll be interested to consider them.

Nice work.

Best regards,

Doug
 

Doug Kerr

Well-known member
Some readers may wonder why it matters in which color space we plot the gamut of a particular color space. A related question is, "why don't we just plot the gamut of the sRGB color space in its own color space?"

Looking at that will, perhaps shockingly, give the answer to why does it matter.

The plot of the gamut of the sRGB color space, plotted in the sRGB color space (that is, in the Cartesian coordinates R, G, and B,) is a perfect cube (255 units on an edge)!

How can that be?

Well, in the sRGB color space, each of the coordinates, R, G, and B, can have any value from 0 through 255. (Actually, only integer values, but if we really took that into account, any of our gamut plots would look peculiar indeed!) Any combinations of in-range values for each coordinate is valid.

Now that that particular plot doesn't help us appreciate the visual implications of the gamut. It just reminds us of the concepts here.

If you think that the L*a*b* color space is the best space to use, overall, for presenting the gamut of some particular color space for your particular purpose, then by all means plot the gamut of your favorite color space(s) in L*a*b* coordinates.

Best regards,

Doug
 

Doug Kerr

Well-known member
Some readers may wonder why it matters in which color space we plot the gamut of a particular color space. A related question is, "why don't we just plot the gamut of the sRGB color space in its own color space?"

Looking at that will, perhaps shockingly, give the answer to why does it matter.

The plot of the gamut of the sRGB color space, plotted in the sRGB color space (that is, in the Cartesian coordinates R, G, and B,) is a perfect cube (255 units on an edge)!

How can that be?

Well, in the sRGB color space, each of the coordinates, R, G, and B, can have any value from 0 through 255. (Actually, only integer values, but if we really took that into account, any of our gamut plots would look peculiar indeed!) Any combinations of in-range values for each coordinate is valid.

Now that that particular plot doesn't help us appreciate the visual implications of the gamut. It just reminds us of the concepts here.

If you think that the L*a*b* color space is the best space to use, overall, for presenting the gamut of some particular color space for your particular purpose, then by all means plot the gamut of your favorite color space(s) in L*a*b* coordinates.

Best regards,

Doug
 

Doug Kerr

Well-known member
Here is a view of an plot of the gamut of the sRGB color space in the CIE xyY coordinate system, made with Chromix ColorThink 2.2 (trial edition):

sRGB-xyY_01.gif


Best regards,

Doug
 

Doug Kerr

Well-known member
I seriously doubt that this plot is actually in xyY. The altitudes of the readily-identified points Bmax and Rmax are just not at all right.

It may be that the "luminance" coordinate is actually log(Y) or maybe or something like L*.

Update:

Ah, yes, I find from the archives that I determined in 2008 that the color space is xyL* (the luminance code erroneously uses the routines that are used in the L*a*b* presentation.. I reported that to Chromix and they said that indeed that was a screwup and I was the only person that noticed it.

They said they were going to fix that.

I will try and upload a more recent free version and see if that happened.

It's always something!

Best regards,

Doug
 

Doug Kerr

Well-known member
OK, here we go:

Here is a view of an plot of the gamut of the sRGB color space in the CIE xyY coordinate system, made with Chromix ColorThink Pro 3.01 beta 23 (trial edition):

sRGB-xyY_02.gif


And here it is done (wireframe only) on Bruce Lindbloom's viewer (I had forgetten about that).

sRGB-xyY_03.gif



Best regards,

Doug
 

Joachim Bolte

New member
Rather, I think the the edges of the solid are between nodes as I will list shortly. Regarding notation: Ro, Bo, and G, are the chromaticities of the three primaries plotted on the plane Y=0.; colors with the "max" subscript are the hottest possible RGB value for that chromaticity (all values either 255 or zero).

Trivial edges, lying along the base plane, included just for completeness:

Ro-Go, Go-B0, B0-Ro

First "risers":

Ro-Rmax, Go-Gmax, Bo-Bmax

Second "risers":

Rsat-Msat, Rsat-Ysat; Gsat-Ysat, Gsat-Csat; Bsat-Csat, Bsat-Msat

To the pinnacle:

Cmax-Wmax; Mmax-Wmax, Ymax-Wmax

Hi Doug,

I can understand why you would want to plot the sat-values to the Y=0 plane (It's like the 'top view' that I included in my picture), but would this result in the 'gamut' you get in your picture? Considering the linear 'nature of the beast', I don't think it is possible to make an sRGB-combination that would fit. What RGB value would the Bo point have?

This illustrates best by not only plotting the maximized values in your graph, but also the 'in betweens'. F.e., plot the points for saturated blue (0,0,255), light-blue (0,0,127) and dark-blue (127,127,255) in the graph, and see how the line evolves.

I have a gut feeling that the values will be near my blue line somewhere, and will not go 'straight down' the Y-axis.

You could do this for all the 'in betweens' for the primaries and secundaries, heck, you could do it (theoretically) for all of the 16,7 million unique colors in the gamut. Then you get a more and more defined 'point cloud' that gives you the shape of the gamut more and more precise.

Question to the side: Are the endpoints of the scale set unambigiously? Is there a record that 'red' in the sRGB colorspace is an exact XYZ or xyY coordinate? Because we could all have a different interpretation of 'red'.
 
Question to the side: Are the endpoints of the scale set unambigiously? Is there a record that 'red' in the sRGB colorspace is an exact XYZ or xyY coordinate? Because we could all have a different interpretation of 'red'.

Correct. That's why when one "assigns" a colorspace in e.g. Photoshop the same color coordinate gets a different meaning and the image suddenly looks wrong in another (e.g. the display's) colorspace.

There is a nice listing of the coordinates of a number of popular colorspaces on Bruce Lindbloom's site. The coordinates of the 3 primary light colors are given in xyY values, and Bruce added some interesting characteristics about e.g. coding efficiency (how many of the possible encodings in the hull represent real/existing colors). Some spaces require extreme values of the 3 primaries to create a hull that encloses some very special colors, but a lot of the coordinates will never be used for something that a human can see as color, so the absolute hull volume only tells part of the story.

Cheers,
Bart
 

Doug Kerr

Well-known member
Hi, Joachim,

I can understand why you would want to plot the sat-values to the Y=0 plane (It's like the 'top view' that I included in my picture), but would this result in the 'gamut' you get in your picture?
Not by itself, but the x-y values of the various "critical" colors, which we can visualize by their projections on the Y=0 plane, are valid (at whatever value of Y they have).

The fact is, we often see the projection of the entire solid (just the triangle, Ro-Bo-Go), along with the projection of the entire space of visible light, on the Y=0 plane. This is what is so often incorrectly spoken of as an illustration of "the gamut of <whatever color space>".

My plotting of the projections of the primaries on the Y=0 plane was in part to relate to that that commonly-seen presentation. But (as I will discuss a little later), they are also the "limits" of three edges of the solid, and thus constitute three of its vertexes.

Considering the linear 'nature of the beast', I don't think it is possible to make an sRGB-combination that would fit. What RGB value would the Bo point have?
Indeed, Bo does not have RGB coordinates; the entire Y=0 plane represents black, for which x and y are undefined (and thus R, G, and B). So we must recognize Bo as the projection on the Y=0 plane of any color for which RGB=0,0,n (n≠0). That line approaches Bo in the limit.

As you hinted at before, the color RGB = 0,0,e (where e represents an infinitesimal) that is infinitesimally close to Bo.

Thus, Ro, Bo, and Go are vertexes of the solid (even though they are actually excluded from it, in the sense of the value at the end of an "open interval", or at least are paradoxical members of it).

This illustrates best by not only plotting the maximized values in your graph, but also the 'in betweens'. F.e., plot the points for saturated blue (0,0,255), light-blue (0,0,127) and dark-blue (127,127,255) in the graph, and see how the line evolves.

I have a gut feeling that the values will be near my blue line somewhere, and will not go 'straight down' the Y-axis.

Your basic point is well taken. Joining the vertexes defined by the set of "primaries" and "secondaries" was a "shortcut" I took, and is not valid. We see that in the "real" plots I recently posted! Note that the non-vertical "edges" are not lines. (But see below regarding 0,0,255 and 0,0,127.)

The reason is that the transform from RGB to xyY is not linear.

The transform from RGB to XYZ, the first step, is linear, but the transform from XYZ to xyY is not. We can see that for the equation for x:

x=X/(X+Y+Z)

Since it has variables in the denominator, it is not linear.

Do note however that the chromaticity, and thus the x- and y- values, of 0,0,255 and 0,0,128 (and 0,0,50) are the same, so they do fall on the same vertical line (which has constant values of x,y). But 127,127,255 is not related to those colors at all (it is quite arbitrary that we might give it a name with "blue" in it ), so we would have no reason to suspect it might fall on the same line.

Similarly, the colors of each of the following pairs fall on the same vertical line:

255,0,0 and 100,0,0
255,255,0 and 100,100,0
200,100,0 and 100,50,0

On the other hand, the chromaticity of 255,0,255 (x,y, its projection on the plane Y=0) does not fall halfway between 255,0,0 and 0,0,255. (The nonlinearities of the transform to x,y,Y visit us there.)

You could do this for all the 'in betweens' for the primaries and secundaries, heck, you could do it (theoretically) for all of the 16,7 million unique colors in the gamut. Then you get a more and more defined 'point cloud' that gives you the shape of the gamut more and more precise.
Indeed, as is done it the plots I recently posted.

Question to the side: Are the endpoints of the scale set unambigiously? Is there a record that 'red' in the sRGB colorspace is an exact XYZ or xyY coordinate? Because we could all have a different interpretation of 'red'.
Indeed, in the sRGB colorspace, the chromaticities of the R, G, and B primaries are rigorously defined in the specification. Thus RGB 128,100,60 describes a specific color, with explicit XYZ (and thus xyY) coordinates. In another "RGB family" colorspace (such as Adobe RGB), they are also defined, but differently. (The G primary is different in Adobe RGB from sRGB. Folklore has it that this happened through an error, but the result had advantages as so was "blessed".)

But if we just speak of "an RGB colorspace" without indicating a particular one (we actually there just mean "the RGB color model") no specific primaries (of specific chromaticities) are implied (although we expect them to somehow deserve the broad names "red, "green", and "blue".

Your "intuitions" and thoughts in this complicated topic area seem to be on the mark. Thanks for your contributions.

Best regards,

Doug
 

Doug Kerr

Well-known member
Hi, Bart,

Some spaces require extreme values of the 3 primaries to create a hull that encloses some very special colors, but a lot of the coordinates will never be used for something that a human can see as color, so the absolute hull volume only tells part of the story.
Well said, and important to keep in mind.

Note, however, that such is not true of any "RGB" color space. Their hulls only enclose visible colors. (I know you said "some spaces"!)

Best regards,

Doug
 

Joachim Bolte

New member
Still speaking from my gutfeeling, I would say that you get a totally different gamut diagram when you take sRGB 0,0,0 into account... because of the mathematical error when dividing by 0.

If you plotted all the combinations except of 0,0,0 onto the xyY diagram, what shape would you get?

Projecting the R, G and B saturated points down to the xy-plane, and calling that figure the RGB gamut, would be like transforming only those cornerpoints only from sRGB to xyY, and then use the xyY-system to complete the gamut... If we do this for the dark values, why don't we for the lighter values also?

I think that to make an honest representation of the colors that can be reproduced within an sRGB gamut, you have to look only at the sRGB combinations, and not make the switch to xyY halfway.
 
What about ProPhoto RGB then? as far as I know it can describe blues that fall outside the visible spectrum.

Hi Joachim,

You just beat me to it! I assume Doug means RGB as values in a cartesian RGB color cube system (like the RGB values in the Photoshop Color Picker). The primaries of e.g. the popular ProPhoto RGB working space allow encoding of values that do not represent a color, when one defines color as having to be visible to humans. A photoeditor like Photoshop is unlikely to produce invisible 'colors' because the profile's "rendering intent" maps those values to fit within the definition on output.

Cheers,
Bart
 

Doug Kerr

Well-known member
Hi, Joachim,

What about ProPhoto RGB then? as far as I know it can describe blues that fall outside the visible spectrum.
142_xyY.jpg
Quite so, and a good point. I should have said that it was not so of sRGB, Adobe RGB, CIE RGB, etc.

Thanks for the good catch.

Best regards,

Doug
 

Doug Kerr

Well-known member
Hi, Bart,

Hi Joachim,

You just beat me to it! I assume Doug means RGB as values in a cartesian RGB color cube system (like the RGB values in the Photoshop Color Picker).
In fact, ProPhoto RGB is a Cartesian space, whose gamut (in its own coordinates) is a cube.

My error was in carelessly neglecting the existence of this (and perhaps others like it) in the "RGB family" of color spaces. (That is, the family of all tristimulus color spaces whose coordinates are labeled "R", "G", and "B", whether or not their primaries are physically-realizable).

Best regards,

Doug
 
In fact, ProPhoto RGB is a Cartesian space, whose gamut (in its own coordinates) is a cube.

Hi Doug,

That's true, I just never think about it that way since it doesn't fill the cube offered by those coordinates:
PPRGB_xyY.png


It also requires relatively big integer jumps through the space to cover the range, so precision is somewhat compromised (as can be seen by converting between it and e.g. sRGB, which certainly shouldn't be done in 8-b/ch mode). It's better to use a space that actually allows to just encode the colors in the actual image at hand, and not much more. Unfortunately the tools to determine that are not common.

And to think even the Pro Photo RGB scpace still falls short allowing to encode certain greens, what an amazing thing our analog eyes can do.

Cheers,
Bart
 

Doug Kerr

Well-known member
Hi, Bart,

Hi Doug,

That's true, I just never think about it that way since it doesn't fill the cube offered by those coordinates:
PPRGB_xyY.png
Well, plotted in RGB coordinates, it does (by definition) fill the cube.

It looks as if the image above has it plotted in x,y,Y coordinates, and of course there it doesn't fill the cube. (No doubt what you meant!)

Best regards,

Doug
 

Doug Kerr

Well-known member
Inn this connection, it is interesting to note that inside a JPEG file the image is actually recorded in the sYCC color space, a specific form of the generic YCbCr color model. It is a transform of sRGB (thus the "s"). It is a "quasi-luminance, quasi-chrominance" color space.

A color space based on the generic YCbCr model can, depending on the limits we place on Cb and Cr, represent "colors" that are outside the visual color space. (These of course aren't truly "colors", but rather "supra-colors" - "color" only actually pertains to visible light.) (This is something like the fact that ultra-violet light isn't light.)

However, as near as I can tell, the definition of the sYCC color space (artificially, but reasonably) limits its gamut to actual (visible) colors. But that gamut is beyond the gamut of sRGB. In particular, at higher luminance, its chromaticity gamut (remember, that varies with luminance) is substantially greater than for sRGB.

It has been said by Canon that "the internal color space of EOS dSLRs is sYCC." I'm not sure that is accurate (whatever exactly it means).

We yet have no evidence of schemes that exploit of the full gamut of sYCC. Colors that can be represented in sYCC but not in RGB of course cannot be delivered by an "sYCC-to-sRGB decoder" (such as we find in JPEG decoders) at the receiving end, but they could be delivered in one of the "larger-gamut" RGB color spaces.

The chromaticity gamut of sYCC at a luminance of 0.715 (the luminance of wide-open green), along with the chromaticity gamut of sRGB at that same luminance, and the chromaticity gamut of sRGB at small luminances, are shown on the CIE x-y chromaticity diagram in this figure:

rgb-sycc-01.gif


Best regards,

Doug
 
Top