Facebook Pixel How to Use LAB Color in Photoshop to Remove an Unwanted Color Cast

How to Use LAB Color in Photoshop to Remove an Unwanted Color Cast

Marin County Headlands with LAB adjustments

In a recent article about the LAB colorspace, I covered the basic LAB move to enhance colors. Hopefully that gave you an idea of the power of the LAB colorspace to manipulate color in Photoshop. In this article we are going to build on that a little bit. Whereas in the last article we simply used the basic LAB color move to enhance color, now we will get into color manipulation. Specifically, I will show you how to remove an unwanted color cast from your photos using LAB. In many ways doing this in LAB is simpler and more powerful than doing it in your normal color space (RGB).

Setting the stage

Removing color casts and manipulating color will be simple for you once you know a little bit about how LAB color works, so first let’s make sure you understand what is going on in the LAB colorspace. Once you understand how LAB works, everything else will be easy.

LAB stands for Lightness, A channel, and B channel. The L channel strictly controls lightness and we won’t be working with it for purposes of this article. All color in the LAB colorspace is within the A and B channel. The A channel consists of greens and magentas. The B channel consists of blues and yellows. The histogram in both of these channels almost always looks like a spike in the middle of the histogram. Because LAB is such a ridiculously broad color space, there will be a lot of empty space on either side of the histogram. As you saw in the last article, this empty space is what gives us the opportunity to enhance color so effectively in the LAB colorspace.

LAB color graphic

Now let’s look at the histogram of the A channel more closely so that you can see how this works. The A channel is a combination of green and magenta. The further to the left you are in the histogram, the more green is present. Conversely, the further to the right you are in the histogram, the more magenta is present (see diagram above).

The middle of the histogram is a gray tone without any real color. It is designated as zero. As you move away from the zero (gray) point in the middle, more color is added. To the left, the numbers go into negatives (all the way down to -128) and things get more green. To the right, you move into positive numbers (toward a max of +127) and things get more magenta (pinkish).

It works exactly the same way in the B channel, only the colors are different. In the B channel you still have a starting middle point of zero, which is also gray. But, as you move to the left on the histogram towards -128, the colors get bluer. As you move to the right towards +127, the colors get more yellow.

Also note that the center line of the histogram runs right through the zero in the center of both the A and B channels. This will be important for identifying and correcting color casts.

If you are still with me thus far, everything will be easy from here. Now you can take what you just learned and see how to identify and fix color casts easily in LAB.

Identifying color casts easily

It is easy to identify a color cast in LAB mode. Just look at the A or B channel. If the colors are more or less evenly distributed on either side of the midpoint of the histogram, your picture will probably not have a color cast. But if the histogram values are skewed to the left or to the right of the histogram, you are probably have a color cast. Here is how it works in the A and B channels:

  • In the A channel, if the colors are more on the left side, you will have a greenish color cast in your image. If they are to the right, you will have a magenta color cast.
  • Similarly, in the B channel you know if the histogram appears shifted to the left, you will have a bluish cast to your picture. If the values are to the right of the histogram, your picture will appear more yellow.

LAB color cast chart

In this way, the LAB colorspace makes it super simple to determine if you have a color cast. Just look at the middle of your histogram, and if the colors are skewed to one side or the other, you know you have a color cast or shift. This is important because a slight color cast is not always apparent to the naked eye. Your eye gets acclimatized to seeing the picture in a certain way, and accepts that as normal. Now this we’ve identified a color cast, let’s set about fixing it.

Fixing  color casts in LAB

Much of the power of the LAB colorspace comes from scooting in the endpoints on either side of the histogram. In the last article, we did that to separate the colors, which enhances them. We moved the endpoints in toward the center the exact same amount on each side of the histogram. That enhanced colors without affecting the overall color cast of the picture. This time, however, we are going to move the endpoints in different amounts to fix color casts.

For example, let’s say your picture has a blue color cast. When you open up the B channel, the spike showing color is skewed to the left of center on your histogram. To fix it, you simply scoot in the right endpoint of your histogram more then the left endpoint. It’s as simple as that.

Let’s try another example, let’s say you open the A channel of one of your pictures, and noticed that the values are skewed to the left of center on the histogram. That means that you likely have a green color cast. To fix it, simply scoot in the right endpoint a little bit. Don’t do it too much, usually three to five points will make a major shift in color.

Identifying and fixing a slight color cast

This might make more sense to you if we walk through an actual example. So here’s a good example of everything we have been talking about in this article so far. We will start with a photo that I was in the process of editing:

Original photo with color cast

I frankly did not see a color cast, however, I decided to check it out. I converted to LAB, opened a Curves Adjustment Layer, and looked at the histogram of the A channel and the B channel. Here is what I saw:

Histogram showing A & B channels

Two histograms in LAB. The left histogram is the A channel. The right histogram is the B channel. Notice that both are skewed to the right of the centerline – a sure sign of a color cast in the picture.

Notice that in the A channel most of the pixels are stacked up to the right of the center line on the histogram. That is a sure sign that there are more magenta pixels than green in the picture. Notice also that in the B channel most of the pixels are also stacked up to the right of center, which means there are more yellows than blues in the picture. Neither necessarily means there is anything wrong with the image, but that might mean a color cast. So let’s make an adjustment as described above and scoot in the left endpoints a little bit in each channel. Here are the two minor moves I made:

Histograms of A & B channels - after adjustment

Here are the histograms after the adjustments. Notice that I pulled in the left endpoints of each to the center.

All I did was pull the left endpoint of each histogram to the center a little bit to offset the fact that the colors are skewed to the right of the histogram in each channel. As mentioned above, a change of three to five points will create a large adjustment, so that is all I did. As the numbers below the histograms reflect, I made the following adjustments:

  • A Channel:  I pulled the left endpoint to the center by four points (from -128 to -124).
  • B Channel:  I pulled the left endpoint to the center by five points (from -128 to -123)

After the adjustment, here is the resulting picture:

Acadia After LAB adjustment

I think it looks better now. To me, it had a color cast that I just wasn’t seeing. The difference is subtle, but significant. In particular, look at the clouds. Here are the before and after pictures side-by-side:

Comparison

The original picture is on the left. The picture on the right had is after a minor LAB adjustment. I did not even see the original color cast, but I think it looks better after the adjustment.

Incorporating this into the LAB color move

Sometimes, you will notice that the spike in the A or B channel is to one side of the center of the histogram, but you do not really want to change the overall color of the picture. It is still important to understand what is going on when you are making your normal LAB color move.

If you ignore the shift to one side or the other, then when you scoot in your endpoints by equal amounts, you may be exacerbating the color shift. Therefore, keep an eye on your histogram and try to make your shift pivot around the spike rather than on the center of the histogram. In other words, if the pixels are to the right of the histogram, scoot in your left endpoint a little bit more (and vice versa). In this way, you can make your normal LAB color move, but at least not add any color cast to your picture.

Why not just do this in RGB?

You may be asking, can’t I just remove color casts in RGB? The answer, of course, is yes. But the LAB colorspace has advantages that I want to make sure are clear to you.

First, because LAB separates Lightness from all color adjustments, LAB allows you to fix these casts without any impact on lightness or contrast. This is not possible in RGB. When you affect the red channel, green channel, or blue channel in RGB, you are necessarily affecting lightness. It is all tied together in RGB.

Second, LAB makes it easier to identify color casts. As you saw above, you just open up the A or B channel and see if the spike is shifted to one side of the histogram. If it is, you likely have a color cast. If it isn’t, you do not. In RGB, you have to compare channels and see how one channel appears compared to the other two channels.

Isn’t this like setting your white balance?

You may have noticed that the LAB colors correspond with the sliders in Lightroom or Adobe Camera Raw (ACR) that are used to set the white balance in your picture. You can think about LAB in those terms and it might help you to understand how the colors work together. But using LAB to manipulate color offers certain advantages over just setting your white balance. For one thing, you can change the colors later in your workflow, and are not compelled to do it right up front. For another thing, you can take advantage of Photoshop’s layers and selections in manipulating color. Although Lightroom and ACR have very helpful aids in setting the while balance, like the White Balance Selector (the little dropper) or the presets, there is no histogram to allow you to really see and fine-tune your changes.

Applying this to your worklflow

What the technique shown in this article will allow you to do, is make your normal LAB color move in a more nuanced fashion. In the last article, I showed you how to make the LAB color move in a basic, unthinking way. You simply moved the endpoints of your A channel and B channel by equal amounts. It is sort of a one-size-fits-all approach, which doesn’t always work in photography. Now, you can use this to manipulate color a little bit or at least keep it from getting worse as you edit.

I have talked about correcting color casts as if there was a special correct way. But of course that isn’t really true and what looks correct to me might not look exactly right to you. Use your own judgment and do what seems right to you. As you make these moves, however, you might want to bias them in one direction or another. Remember that sometimes a color cast can add effect or mood to your picture. Sometimes a slight color cast just looks good. For example, a warmer tone created by a yellow or magenta cast can actually enhance your picture. Sometimes, but less often, a bluish cast can be appropriate. Also remember that a greenish cast never looks good and should be avoided.

I know it can sometimes be confusing knowing where colors reside, and how to fix them within the LAB color space. To try to make it easier for you, here is a chart:

LAB Color Casts Chart

Conclusion

The LAB colorspace is a powerful beast. You previously learned how to unleash that power by using the basic LAB color move. Using the technique in this article will allow you to tame that beast a little bit. It will allow you to use the power of LAB without getting garish effects or color casts in your pictures. It will also allow you to fix these color casts simpler and easier than anything that RGB allows. Give it a try and see if it corrects your colors.

Read more from our Post Production category

Christina N Dickson
Christina N Dickson

is a visionary artist and philanthropist in Portland Oregon. Her work includes wedding photography www.BrideInspired.com and leadership with www.RevMediaBlog.com.

I need help with...