This Tutorial published at

Color Cast by Numbers
Posted by: kyo on 12-31-1969.

"A quick and easy way to fix color casting without any guesswork. Written for Photoshop CS3 Beta, but applicable to CS2 and possibly previous versions as well."

There are many, many different ways to remove a color cast in Photoshop, but I have found that most of them require a lot of guessing, a bit of "yea I think that looks right" and endless trial and error. Things are compounded if your monitor is a little off, or your eyes aren't perfect. So I set out to find a solution that removes the guesswork, and works with the numbers. Photoshop is after all, based on numbers.

In the process, I discovered a way to not only QUICKLY remove color cast, but to color balance photos pretty well in the process. The only side effect is that things do become quite equal, and you can sometimes loose a bit of contrast, but that is easily remedied with other methods. However, for this tutorial I will focus only on the color cast aspect.

I will say that at first this process seems a bit tedious, but I assure you once you do it a few times it will go very, very quickly and you can go from start to finish in under a minute or so.

Here is a photo I took while on vacation in Colorado. The sky was very blue that day, and without being able to put all of nature into a controlled setting (and since I was on a moving train when I took the shot) I was bound to get color casting. While I personally like a blue tint on snow, let's see if we can get it back to reality.

This of course is just an example, and this same technique will work for any color cast from minor to extreme. Feel free to save the image and follow along.

Step 1:

At this point, lets set our eye droppers to do some of our later work for us. This is optional, and if you choose not to do it I have noted the alternatives where needed.

Open the Curves menu by going to Image > Adjustments > Curves or by pressing command+m (or cntrl+m on a pc).

Double click the left eye-dropper, this will set your black value. This brings up the target shadow color dialogue. I have found that setting a value of 10 to R, G, and B gives me a nice solid black that isn't blown out on prints. Ignore the values in the other fields.

Repeat this step for the right dropper, setting a value of 244 for R G and B as well. This insures brilliant whites, but makes the printer print ever so lightly so that they blend much better into the image.

Repeat one more time for the middle dropper with a value of 133 which will set your grey midpoint.

If you choose not to make that adjustment, you can still continue as it is optional, but you will want to use slightly different values which I will note as we go. On to the fun.

Step 2:

Before we begin it is probably a good idea to make sure you have your cursor display set to precise. You can do this by going to the preferences dialogue (Photoshop > preferences on a mac, unsure about pc) and selecting the cursor preferences, and setting 'other cursor' to precise.

Go ahead and copy your background layer using command+j (cntrl+j on a pc). Now open the adjustments pop-up from the bottom of the layers pallet, and select threshold.

This is a widely ignored feature of photoshop it seems, mainly because I can't see it being very useful for much. However, this is where it shines. What it does, is allows you to see the absolute darkest and lightest areas of an image.

Slide the slider all the way to the left. This shows your darkest parts of the image. In many cases, the whole screen will just be white, so slowly bump the slider up until you start to see some black specs appear. If you have done the pure value adjustments above, you can stop when any black specs appear. If you have not, bump the slider up a little bit further until some stronger areas begin to appear.

If you are having trouble pin-pointing those spots, you can zoom as I have done above and move around as necessary by using keyboard shortcuts. command + (cntrl +) will zoom in, command - (cntrl -) will zoom out. Holding the space bar and clicking and dragging will get you around the image.

If you hold the shift key, and click one of the black specs, it will set a color selection point, with the number 1 next to it. This is what we will use to set our black values. In the images above and below I have circled the point in yellow and changed the number and point to red for visual purposes, yours will look more subtle.

Now take the slider all the way to the right to show the highlights. Again you likely won't see anything at this point (unless you have some blown-out highlights), so back it off until you start to see some white specs appear. Again if you have not done the pure value adjustments above, go a little further until you get some more significant areas of white. Shift-click on a white spec and now you have your highlight setting.

Since we don't actually need a threshold adjustment layer, you can go ahead and click cancel.

Step 3:

Now this is the part that presented a problem for a while. We now have a black point, and a white point, but what about the grey? While reading about blending modes and what they actually do, I stumbled across the answer.

Create a new layer by clicking the new layer button on the bottom of the layers palette.

Now go up to Edit > Fill and fill the layer with 50% grey.

Now head over to the blending modes on your layers palette. Click where it says Normal, and select Difference mode from the drop down.

 This is a mode that I had never found much use for until I finally   found out what it is doing. What it does, is it takes the layer and  compares it to the layer underneath it. Any values that match  exactly, turn pure black.. any values that do not, are assigned some value in-between. The result is a very strange looking image, but in this case a very useful one.

Step 4:

Go ahead and open the threshold adjustment again.

Since your 50% grey layer, is now black wherever it matches the exact grey of your image, we can now pin-point the exact middle-grey value of our image.

Push the slider all the way to the left, and slide up as needed to get some black specs appearing again. Again, if you have not done the adjustments above, go a little further until you get some significant black spots. Shift-click and viola, we now have a grey point, shown by the number 3.

Cancel out of the threshold dialogue, and go ahead and delete the 50% grey layer we created by dragging it to the trash can at the bottom of the layers palette.

Now it's time to reveal the fruits of our labor.

Open the curves dialogue. Image > Adjustments > Curves or command+m (cntrl+m on a pc).

You will notice that your selection points are now visible. They will likely be a bit different than the ones I chose, but that's ok, which particular spec you chose earlier doesn't have to be the same as mine.

Click once on the left eye dropper.

Zoom in/out as necessary with the keyboard shortcuts to locate your number 1 selection point. Make sure your cursor is positioned directly over it, it will change colors when it is exactly lined up. Now simply click to set your black point.

Repeat this step for the right eye dropper, using selection point 2.

Finally the fun one.. repeat this step for the middle eye dropper, using selection point 3 and you will suddenly notice a huge jump in your image.

Click ok, and there you have it, color casting is gone, and the image is a bit more balanced overall. As previously mentioned, you will occasionally lose some of your contrast, but it is easily remedied with one of the many techniques found on this site and elsewhere.

Here is a before and after. Do note that the water in that river actually was very green and yellow, that's not a side effect of this technique.

I hope this has been helpful and informative, and thanks for reading. I look forward to hearing any and all feedback.

This Tutorial published at