Help us keep the lights on:
Join this years fundraising campaign and get a limited edition supporter's cap.
Read more about our plans and needs for 2024 and beyond.

X


Sign up Login
Home Forums Articles Galleries Members Galleries Master Your Vision Galleries 5Contest Categories 5Winners Galleries 5ANPAT Galleries 5 The Winners Editor's Choice Portfolios Recent Photos Search Contest Info Help News Newsletter Join us Renew Membership About us Retrieve password Contact us Contests Vouchers Wiki Apps THE NIKONIAN™ For the press Fundraising Search Help!
More5

PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPACE

Fri 02-Mar-18 07:42 PM
The following is a continuation of my trying to understand the Lab color space. In a post, on Jan. 27, 2018, I gave an explanation of the Lab color space and showed graphics I created in Photoshop, to be used for inverting colors in the Lab color space. In a follow-up post, on Feb. 13, 2018, I showed what is produced by inverting the RGB color space and the Lab color space. By inverting colors in Photoshop, you use "image>adjustment>invert", on an active RGB image (all R, G, B, color channels selected), or on an individual R, G, or B, color channel, or on an active Lab image (all L, a, b, channels selected), or on an individual L, a, or b, channel.

When you invert an image in the RGB color space, you get the complement of the colors in the image, and the resulting colors are easy to predict. Not so in the Lab color space. To me, the resulting colors were unexpected and sometimes really baffling. For example, Red in the RGB color space is 100% pure red (255,0,0), however, in the Lab color space, the same 100% pure red is 64% red and 55% yellow, 100% pure blue (0,0,255) is 54% red and 88% blue. How can that be, and why do the percentages not add up to 100%??? And when you invert the red and blue in the Lab mode, you get really baffling colors.

That is the reason I continue to investigate, and try to understand, the Lab color space.

I am providing, to the members, the following information that I have learned so far about the mysterious Lab color space.

Here is a graphic of the RGB color space, figure 1. I found it on the internet, no author was given. It shows the location of pure Red, pure Green, pure Blue, and their complementary colors, pure Cyan, pure Magenta, and pure Yellow.

Click on image to view larger version



I created the following graphic (figure 2) of the six pure colors in Photoshop to show what Photoshop gives for the corresponding Lab L, a, b, values for the six pure colors.

Click on image to view larger version



It should be noted that Photoshop gives its own L, a, and b, values, but some other graphic programs have given slightly different values. I will only give Photoshop values in this post.

To repeat what I have given in the previous posts, a Lab "+a" value gives red colors, "-a" values gives green colors, and a "+b" values gives yellow colors, and a "-b" values gives blue colors. The Lab "L" values gives the lightness of the image, and varies from 0% (black) to 100% white. The "+a" and "+b" values vary from 0 to 127, and the "-a" and "-b" values vary from 0 to 128.

Figure 2 shows that, in the Lab color space, pure red consists of red and yellow, pure green consists of green and yellow, pure blue consists of red and blue, pure cyan consists of green and blue (the same as in the RGB color space, but not 50%-50%), pure magenta consists of red and blue (the same as in the RGB color space, but not 50%-50%), and pure yellow consists of (surprisingly), green and yellow.

The following is a Lab color space graphic (figure 3), that I got off the internet (no author), and used it in Photoshop to plot the location of the "L", "a" and "b" values for the six pure colors. It is a complex graphic that I have shown in the previous posts.

Click on image to view larger version



This graphic has to be incorrect. Pure Blue plots as a magenta(?), pure red as an orangish red, pure cyan as dark blue green, and pure yellow as a greenish yellow? Pure green and pure magenta seem to plot correctly, the two locations looks green and magenta. However, read on, the graphic is correct.

The in Figure 3, the top figure and the left side figure, show the values of L (lightness) for the pure six colors. The two figures also show the colors that make up the pure colors in Lab color space.

Figure 3 shows that the Lab color space is really a very complex color space. It should be noted that the Lab color space is a three dimensional space, whereas, the RGB color space is two dimensional. I went to the internet to look for other Lab color space graphics to see if the pure colors plot differently than they do in Figure 3.

I found a graphic (no author) that is three dimensional which shows the Lab color space at L = 0%, 50% and 100% lightness, Figure 4. I plotted the six pure colors at each of the three levels of L (lightness).

Click on image to view larger version



Interestingly, blue plots as magenta at L=100%, but as blue at 50%. Red plots as light orange at L=100%, but as red at 50%. Cyan plots as cyan at L=100%, but greenish blue at 50%. Yellow plots as yellow at 100%, but as greenish yellow at L=50%. Magenta and Green plots correctly at both L=50% and 100%. If this graphic is correct then, obviously, the colors change with the value of L (lightness). I suspect that the secondary colors in Red (yellow), Blue (red), yellow (green), start to dominate at different L values. Note that all six colors are black at L=0%, which you would expect since L=0% represents black. Read on, four of the pure colors are not black (0,0,0) at L=0%, so Figure 4 at L=0% is not correct. However, is Figure 4 correct at L=50% and 100%, we will see.

Thinking that pure colors change color with the value of "L", I decided to create my own graphic in Photoshop to see if, indeed, that the colors do change with a change in "L". In making the graphic, I kept the Lab color components, "a" and "b", constant, so that the color component of each color does not change. I then changed the value of L from 0% to 100% in 11 steps to create Figure 5:

Click on image to view larger version



Well it is true, the pure colors do change with the value of L!

Pure Red changes from a very dark red at L=0%, to a light orangish red at L=100%,

Prue Green changes from black at L=0%, to a slightly yellowish green at L=100%,

Prue Blue changes from dark blue at L=0%, to a light violet at L=100%,

Pure Cyan changes from almost pure black at L=0%, to Cyan with a little red at L=100%,

Prue Magenta changes from dark violet at L=0%, to a light magenta with green at L=100%,

Prue Yellow changes from black at L=0%, then greenish yellow for L=10% thru L=90%, to yellow with a little blue at L=100%.

And,
Pure RED (255,0,0) is at L=54%,
Pure Green (0,255,0) is at L=88%,
Prue Blue (0,0,255) is at L=30%,
Prue Cyan (0,255,255) is at L=91%,
Prue Magenta (255,0,255) is at L=60%,
Prue Yellow (255,255,0) is at L=98%

It looks like Figure 3 is showing the correct pure colors, however, as we now know, the colors are at different L values, therefore, Figure 3 has mixed L values.

Figure 4 looks correct at L=50% and 100%, but way wrong at L=0%. Only two colors are black at L=0%. They are Yellow and Green (although Cyan is nearly black at L=0%).

Because Figure 4 is incorrect at L=0%, I searched the internet for a graphic that shows the color at L=0%.

I could not find one for L=0%, but I did find one (no author) that appears to represent the pure colors at L=10% to 30%, it is shown in Figure 6.

Click on image to view larger version


I plotted the location of the six pure colors on this graphic. This graphic looks to be close to a true representative of all of the colors except Blue which should be lighter. Figure 4 would look truer if its L=0% graphic was replaced with this Figure 6 graphic.

Well, that's it. I now know that, in the Lab color space, a given color changes color with changes in the value of L, the lightness of the color.

Now, I can get back to what I was doing in January before I started this long effort to understand the Lab color space. That is, I can start inverting, in the Lab color space, the graphics I created and showed in the Jan 27th post.


Leon







Visit my Gallery

Visit

Enjoy photography with my Nikon D500 camera and have fun with Photoshop CS6
Attachment#1 (jpg file)
Attachment#2 (jpg file)
Attachment#3 (jpg file)
Attachment#4 (jpg file)
Attachment#5 (jpg file)
Attachment#6 (jpg file)

Subject
ID
Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
1
Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
11
Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
2
Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
3
Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
4
Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
5
     Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
6
          Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
7
          Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
9
          Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
10
Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
8
Reply message RE: PURE COLORS R,G,B,C,M,Y, NOT PURE IN Lab COLOR SPAC
12

G