Lab Color Series: What is Lab Color?(And why you should care)
Welcome to the first entry in my Lab Color series of articles (and videos) on Lab Color. It only seems appropriate to begin the series with an introduction to, and explanation of, Lab color. The Lab (pronounced L – A – B, not “Lab”) color space is formally referred to as CIELAB and is a color space that device independent, which means it is not based on the color reproduction capabilities of specific output devices such as monitors and printers like the sRGB or Adobe1998 color spaces.
Despite having one channel defining lightness and only two channels that define the color, Lab contains an extremely broad gamut of colors and not only exceeds the gamut of RGB color spaces like Adobe 1998 and sRGB, but it can define colors that can’t be reproduced or in even imagined. How is this possible?
It would seem, since Lab employs only two channels to define a color, it would be at a disadvantage compared to RGB or CMYK. Both RGB and CMYK use three channels to define color, with the latter employing a “K”, or black channel in addition to the cyan, magenta, and yellow channels and seems that they would be able to define a wider gamut of colors. To understand how Lab can define a wider range of colors, let’s first take a look at how RGB works.
Note: I want to point out that the ProPhoto RGB space, developed by Kodak, also contains within its gamut colors that are “imaginary” or not visible to human vision. However, it is still based on the RGB color definition principle and as such doesn’t offer some of the unique abilities as Lab.
How RGB Works
The RGB color space defines a color by using values from 0 to 255 for how much red, green, and blue are used to create that color/shade. The higher the value, the more of the designated color is used.
In figure 1a, you can see how the RGB values of 255,0,0 highlighted in the yellow box, create a “pure” red color completely lacking any green or blue. You can also see, in figure 1b that when the same values are used for each of the R, G, and B values such as 121, the resulting color is gray.
How Lab Color Works
In the Lab color space, L represents lightness, but the a and b color channels don’t simply represent how much of one color is implemented, but instead these are “opponent” color channels. In Lab, the a channel represents a green versus red* value. How does it do this?
Figure 2 shows the relationship between the a and b channels. Both positive and negative integers are used int the Lab color channels. In the a channel, positive numbers represented red, or more accurately, magenta, while negative numbers represent green which is the opposite color. The b channel works similarly, with positive values representing yellow while negative numbers towards blue, yellow’s opposite. The further the value in a or b is from zero, the more saturated the color in that direction.
Figure2
For those of you keeping count, don’t let the fact that the “number” of the values in Lab would seem to indicate less possible variations. With the three 0-255 values producing 16.7 million colors used in RGB and two 0-255 values (a and b) and a single 0-100 channel (L) that create 6.6 million color variations in Lab. I can assure you that’s not how it works, but I can completely understand how you might think that, and I thought that too initially.
Figure 3 shows the Lab gamut with the Adobe RGB and sRGB colors paces neatly contained within. You can also see CMYK is represented breaking out a little bit from sRGB but still wholly contained in Adobe RGB and dwarfed overall by the Lab color space.
Figure 3
An important aspect of Lab color is that it is based on human vision and not the capabilities of an output device. Also, the range of -128 to 127 for the a and b channels used in Photoshop and similar applications is for ease of implementation in imaging applications. Values for the a and b channels actually have no set limit, however it would be impractical for image editing tools we might use in photography to be capable of colors so far out of our visible range.
The fact that Lab can define colors that aren’t reproducible or even “real” doesn’t seem to offer an advantage that would be useful when editing images that need to be displayed on screens, paper and other visual media. It does, however, offer the ability to make certain types of color corrections and saturation adjustments that are essentially impossible to do in RGB. I will touch on those in a future installment in this series. What I feel is more useful, at least in my image editing work, is how the color and lightness are kept completely separate in Lab.
Figure 4
As you can see in figure 4, the gray color selected in the color picker is defined only using the L channel of Lab. There are no color values in use in the a or b channels to define this color, or shade, actually. Even in CMYK, there are still values in use that represent an amount of color that is used. I should note that in HSB, there is a separate “black” component but HSB is not a color space that one can work in within Photoshop and most other image editing tools (but there are some**).
This separation of color and lightness are part of what make the Lab color space a powerful tool for adjusting not only color and contrast, but it can be useful for other editing processes such as sharpening which relies on heavily on contrast adjustment.
If you want to learn many of the technical details of CIELab, you can check out this link on wikipedia. A more detailed explanation can be obtained directly from the CIE website, but they do charge a fee for the documentation :). The breadth and depth of the subject is much greater than I can (or want) to cover in this writing. For the scope of this article, I am going over the use of Lab color as it pertains to Adobe Photoshop and similar applications that support this color space such as Affinity Photo, GIMP, and others.
Entering the Lab Color Space in Photoshop
First, let’s take a look at where to implement the Lab color space. With an image open in Adobe Photoshop, go to the main menu and select Image>Mode and choose Lab color.
Figure 5
Figure 5 shows the path to take in Photoshop’s menu. After selecting Lab color, it is unlikely there will be a noticeable change to the image being displayed. However, you will see a change in the Channels palette. On the left side of figure 6 we have the RGB channels and on the right we see the Lab channels. You can see that the a and b channels look much different than the color channels in RGB.
Figure 6
Once you have converted the image to the Lab color mode, most tools and features will operate normally, but some items are now grayed out. This applies most heavily to the Edit, Image, and Filters menus. You can see in figure 7 that several filters are no longer available when working in Lab mode. Since you will most likely be converting back to RGB mode before final output, this should be nothing to worry about.
Figure 7
Why Should you Care?
The above explains how Lab works and where you can find it in Photoshop, which was the goal of this overview. Before concluding, though, I want to show an example of the power of Lab color and why you might want to learn more about how to take advantage of the Lab color space.
Adjust Contrast without Affecting Saturation
The Curves adjustment is probably the most powerful tool in Photoshop for adjusting contrast and color. A simple “S” curve adjustment can transform a flat image into one with “punch” and lets you do so with a great deal of control. If you have used Curves before, you have likely seen how it doesn’t take much adjustment to go from a welcome improvement to a complete disaster.
Figure 8
Figure 8 is an image I took of model Dustin Steel outside in Murfeesboro, TN back in 2020. The weather was overcast, and it was drizzling on and off during that afternoon. The straight out of camera image is flat and could use some contrast adjustment to make it “pop”. And yes, you can adjust the raw image in Camera Raw/Lightroom but Lab is not an option in these raw developers and this is all about Lab, right?
In figure 9, I have applied an S curve which lowers the shadows and lifts the highlights. I also raised the mid-tones a little as well. The contrast is now much better, but there are some unfortunate side effects.
Figure 9
One of the things that can happen when you increase contrast in an RGB based image is that saturation also increases. In this case, the greens and blues actually look better, if a little unrealistic. However, it has created a ruddiness to the red’s Dustin’s face, especially around the eyes and mouth.
Applying a curve to create a similar increase in contrast using the Lightness channel of Lab increases the contrast without increasing the saturation of the colors. In figure 10 you can see this in the shadow areas of the face as well as the definition of the seams of the denim jacket.
Figure 10
The skin tones are now more faithful to the original and the green grass patch in the background is also more realistic, as are the orange/yellow threads in the jacket. Looking closely at the Curves dialogue box in figures 9 and 10 show what I did to achieve this. I’ll be posting an article that goes more in depth in the next article in this series.
Lab color may not be something you work in every day, and more likely it may be something you find useful only on rare occasions. In my own work I don’t often make the trip to Lab but when a particularly difficult color issue comes up, I’ve been glad to have the Lab color space available.
Conclusion and Further Reading
I hope you now have a better understanding of the Lab color space and how to access it within Adobe Photoshop. This article is meant to provide a high level view of Lab color and a glimpse of what you can do with it. In the future I’ll be creating articles that cover specific use cases where implementing Lab color may be a better, or even the only way, to achieve a desired result.
If this taste of Lab color has got you interested in learning more, which I hope it has, I highly recommend getting Dan Margulis’ book: Photoshop LAB Color: The Canyon Conundrum and Other Adventures in the Most Powerful Colorspace. I and many others feel this is THE definitive source for learning about Lab color and how to use it. This book can get very technical, but it balances that with practical exercises, so you can learn as little or as much as you want.
You can purchase this book*** on Amazon here: https://a.co/d/9R75Msj . This is the only place where I can still find new copies for sale, but you can find it used if you look for it. I want to make clear that I have no affiliation with Mr. Margulis and I receive no compensation for recommending this book.
In closing, please reach out to me if you have questions about this topic. I will be the first to admit that I don’t know everything about Lab Color, but what I do know has certainly come in handy, and I’m glad to share. Also, if you see something here that doesn’t look right or that I flat out got wrong, please let me know. While I’m making the best effort to provide accurate and useful information here, this is a very broad and deep topic, providing me plenty of opportunity to make an error.
*although CIE defines the A channel as “red versus green” the actual color is more often perceived as magenta than red.
** Some image editing tools can work in the HSB (or HSL or HSV) color space, so I want to make it clear that they are out there, but not often used in photo image editors.
***The purchase link points to the 1st edition of this book. There is a 2nd edition that was only in print for a short time and commands quite a high price now. I don’t feel the updates in the 2nd edition provide a significant benefit over the 1st edition in learning Lab color. However, if you find an inexpensive copy out there, please let me know :).