Out of Gamut: Color-Correcting Photographs in Photoshop
I'm often asked, "what's the easiest way to color-correct images?" My answer is always the same: Fix the neutrals and the rest will follow. True, it isn't always quite that simple -- fixing the neutral areas won't always solve your color problems. But surprisingly often, if you find something in the image that you know should be neutral -- that is, white, black, or gray -- and you make it so, you'll find that the rest of the color falls into place.
In Adobe Photoshop, the tools I always use to accomplish this end are Curves, the Info palette, and a Photoshop working color space. It may seem odd to include the working space as one of the tools, but there's a very good reason for doing so. Photoshop working spaces are inherently gray-balanced, which simply means that equal numbers of R, G, and B will produce some shade of neutral gray, black, or white. This is very often not the case with monitor or scanner spaces, and it's pretty much never the case with RGB printer spaces, so creating a neutral in these spaces is much, much harder. (For a more in-depth discussion of working spaces, refer to "Photoshop 6 Gets Smart With Color".)
Remove the Cast
Let's look at an example. The image in Figure 1 has some obvious color problems. I've never seen a bright blue rock, and I suspect that you haven't either. In fact, the image overall appears to have a blue cast.
Figure 1: A blue cast detracts from this image.
Even though the cast appears visually obvious, it's always a good idea to check the numbers in the Info palette to be certain. It can be hard to distinguish between a blue cast and a cyan one, or a green cast and a yellow one, and since the remedies for each are quite different, it's a good idea to be certain which color is present or absent in excessive amounts.
I use the Info palette to determine pixel values. The Info palette always reads the pixel values of the pixel or pixels beneath the cursor. The exact values that appear depend on two things: the zoom percentage you use to view the image, and the setting for the eyedropper tool. This latter affects the numbers that appear on the Info palette no matter which tool you're using. I always set it to Point Sample -- which takes color data from a specific pixel -- rather than 3x3 Average or 5x5 average which grabs the average values of a grid of pixels. The downside of Point sample is that you need to be careful that the pixel you pinpoint is representative of the image -- that it isn't some random scanner noise. The advantage is that you can be very precise, and if you need to sample the average of a group of pixels, you can simply zoom out to a percentage less than 100%. (At 50% view, you're sampling four image pixels.)
I generally start by looking at the numbers in areas that I think should be neutral. Figure 2 shows the RGB values obtained from two different locations on the rocks in the foreground.
In this case, the info palette confirms that we have an overall excess of blue. (For further confirmation, I sampled additional areas -- the snow and background, for example -- and all showed a predominance of blue.)
Throw it a Curve
Photoshop offers many different ways to fix this problem of too much blue, but my tool of choice is always Curves. However, if I'm working on a high-bit file, I can only apply the Curves adjustment to the actual image data as Adjustment Layers are unavailable (for more on this topic, read "The High-Bit Advantage"). For 8-bit-per-channel images, I always use a Curves Adjustment layer, both because it's more flexible, and because when you use Adjustment Layers to edit the image, all the edits are calculated at the same time when you flatten the image. This approach degrades the image much less than burning successive rounds of corrections into the image one by one. (You can create an Adjustment Layer either by choosing New Adjustment Layer from the Layers menu, then choosing the type of Adjustment Layer you want from the New Adjustment Layer submenu, or by clicking the Adjustment Layer icon in the Layers palette and choosing the layer type from the icon's popup menu.) But no matter whether you apply Curves directly, or through an Adjustment Layer, once the Curves dialog box appears the procedure is identical.
The Curves dialog box contains a tool that's very often overlooked -- the gray eyedropper. The gray eyedropper behaves very differently from its better-known black and white siblings. The black and white eyedroppers simply force the pixel on which you click to the target value set for the tool (you set target values by double clicking the eyedropper to open the Color Picker), and adjusts the rest of the image by the same amount. The gray eyedropper, however, moves the color of pixel on which you click towards the target value while retaining its native brightness and some of its color, again adjusting the rest of the image by the same amount. It's very useful in fixing neutrals. Sometimes it's all you need, and most of the time it gives you a good starting point for further work.
The easiest way to learn the gray eyedropper is to experiment with it. Figure 3 shows what happens when we click the gray eyedropper (set to its default target value of RGB 127) on different pixels in the image. The first image (at left) produces a result that's too yellow (it takes out too much blue), and the middle image produces a result that's too magenta (it's taken out too much green as well as blue). The third image (at right) produces a result that's pretty reasonable, so we'll go with that.
Figure 3: Experiment with the gray eyedropper, which adjusts the neutral value.
As a general rule, if I don't get something useful by the fifth or sixth click of the eyedropper, I abandon it and start working the curves directly, but in about 80 percent of cases, the eyedropper gets me very close to where I want to be. If we examine the individual channel curves shown in Figure 4, we can see what the eyedropper has actually done. It's adjusted the mid-tone to remove rather a lot of blue, added a very little green, and added rather more red than green.
Figure 4: The red, green, and blue channel curves for the first image above.
Do That Again
One advantage of the gray eyedropper in addition to being very quick is that it adjusts the color without affecting tone: That's why it added green, which is a not particularly intuitive move when you're adjusting the curves manually.
Using the gray eyedropper definitely helped the image a lot, but it's still not as good as it could be. If we look at the pixel values in the snow, we find they contain quite a bit less red than blue or green: We have a cyan cast. You may be tempted to adjust the curve created by the eyedropper to fix this. My advice is to use a second set of curve adjustments: If you're using Adjustment Layers on an 8-bit-per-channel file, you don't need to worry about successive rounds of curves degrading the image, and if you're working on a high-bit file, you have more than enough data to withstand two rounds of curves. It's simply a lot easier to fix the problem using a new curve than it is to tweak the old one.
Figure 5 shows a curve that removes the cyan cast, along with the resulting image. Note that I put anchor points at the mid-tone and three-quarter tone to prevent the curve from affecting anything other than the highlights and quarter-tones, where the cast is prevalent. Some areas of the snow are still slightly cyan, but they look natural.
Figure 5: Another curves adjustment removes the cyan cast from the snow.
Rough Around the Edges
There's one remaining problem: The high-contrast edge of the snow bank has a nasty greenish-cyan cast that extends to the fringes of the critter's fur. This just isn't fixable with a global curve: If we create a curve that neutralizes the color fringe, we'll distort the colors elsewhere in the image. I need to make a selective correction. Here's one way to effect such correction.
First, I make a Color Range selection of the color fringe, by choosing Color Range from the Select menu, shift-clicking pixels in the color fringe, and adjusting the Color Range Fuzziness setting to get the selection I need.
Figure 6: Making a Color Range selection lets us target the undesired green fringe.
With this selection active, I make a Hue/Saturation Adjustment Layer by clicking the Adjustment Layer icon in the Layers palette then choosing Hue/Saturation from the popup menu. Whenever you create an Adjustment Layer while a selection is active, the Adjustment Layer automatically uses that selection as a Layer mask. I desaturate the selection by 100 percent -- completely, in other words -- by dragging the Master Saturation slider all the way to the left.
Figure 7: Using a Hue/Saturation Adjustment Layer, we desaturate the undesired fringe.
This helps a bit, as shown in Figure 8, but it's still far from perfect: The Color Range selection didn't include enough of the color fringe.
Figure 8: The image after applying the Hue/Saturation Adjustment Layer through a layer mask.
To make the final fix, I need to edit the layer mask. When I target the Hue/Saturation Adjustment Layer by clicking on its tile in the Layers palette, the Layer Mask appears as a channel in the channels palette. I target the Layer Mask channel by clicking its tile in the Channels palette, but keep it invisible by clicking off the eyeball icon in the Channels palette, so that I can see the effect of the edit on the image.
First, I run the Gaussian Blur filter on the Layer Mask to soften the edges of the selection and provide some feathering. The goal is to produce a range of grays along the edges in the mask, instead of a sudden transition from black to white, masked to revealed. Once we have a range of gray levels, we can edit the mask to control the color fringe. On a low-resolution image, a single-pixel blur is enough. On a high-resolution image I'd use a larger radius setting as the edges that we're trying to affect contain more pixels than in a low-resolution image. If we want the mask to have gray values all across the edge of a high-resolution image, we need a higher radius Gaussian Blur.
The blur doesn't make much visible difference. The real magic is in the next step. I use Levels to change the contrast of the Layer mask, driving enough pixels to white to wipe out the objectionable color fringe. (A Layer Mask is simply an 8-bit channel. Black pixels in the Layer Mask protect the underlying pixels from the edit, white pixels apply the edit fully, and gray pixels apply the edit partially, with the strength depending on the shade of gray.) As I drag the white input slider to the left, more and more of the layer mask pixels are forced to white, allowing the desaturation to affect the underlying pixels. Tweaking Levels to force all the pixels to either black or white -- a radical move that would destroy most images -- has exactly the desired effect on the layer mask as shown in Figure 9.
Figure 9: Using Levels, we alter the contrast of the Layer Mask to strengthen the desaturation of the fringe area.
But what if you're working on a high-bit file? Neither Color Range nor Adjustment Layers are available in high-bit mode. There's an easy but not-obvious workaround. First, duplicate the image and downsample the duplicate to 8 bits per channel. Then, make the Color Range selection, add the Hue/Saturation layer, and tweak the layer mask as described above until you've arrived at the desired result.
Then go back to the high-bit image, and choose Load Selection from the Select menu. You'll find that you can load the layer mask from the duplicate's Hue/Saturation layer as a selection. Do so, and apply the same Hue/Saturation adjustment as you did in the downsampled duplicate to the high-bit file. With this technique, you'll find that it's quite easy to make selective local edits on high-bit files, even although the tools for doing so appear to be unavailable.
Figure 10: The finished image.
Note that we made two different kinds of corrections for neutrals in this image. The first two rounds of Curves adjustments corrected all the colors in the image, pulling them into the correct balance. The last tweak to remove the color fringe didn't affect the other colors in the image, it simply made the image look right. In the majority of cases you can probably get by with only the first type, and it's by far the quickest way to achieve correct color balance. But when we see something in an image that our minds tell us should be neutral (like the edge of a snow bank) as colored, it makes the image look wrong, and we have to fix that too. Always make the global corrections first, and follow with the selective ones as necessary.
Read more by Bruce Fraser.
Liked This? Read These!
Excerpted from "Photoshop Color Correction" (Peachpit Press). Read More
Versions: 5, 5.5 Operating systems: Macintosh, Windows Read More
IPA, The Association of Graphic Solutions Providers, announces a new webinar series entitled, "Image Color Evaluation, Correction and Adjustment in a Production Environment." The two-part series,... Read More
I have been using the Hue and Saturation Adjustment tools that Photoshop provides for a long time. Usually I am just making overall image adjustments, but from time-to-time there is a specific area... Read More