Color Correction by the Numbers pt.1 - The basics
The very first article in the "Photoshop by the Numbers" series ended with the following sentence:
"In a later article, I will explain how to use the RGB values to assess an image's color accuracy and correct color casts."
It's now time to present that 'later article'.
Reading that last sentence again, the first question could be: what exactly is color accuracy, and related to that, what is a color cast? If we make a photo, wouldn't the camera, more than anything else, store the colors as accurately as possible? How could we end up with incorrect colors then?
To answer that question, we have to look at how our eyes and our brain see the world around us.
The case of the cast
Most objects do not emit light by themselves. We can only see them because they are illuminated by some external light source: the sun, a light bulb, a fire, etc.
This implies that these objects take some of the color of these light sources. Take a white sheet of paper, illuminate it by yellow light and it reflects yellow light. When we look at this paper, yellow light hits our eyes. Still, what we SEE is... a white piece of paper. Given the yellow light source, everything illuminated by it gets a yellow cast. Somehow, our brain recognizes that and corrects such cast automatically.
Example image. Correct color or not?
So what happens when we make a photo of a white sheet illuminated by yellow light? If the camera doesn't do any color correction, the sheet will be yellow on the photo. Again, without any color correction we make a print and the sheet on the print still looks yellow. Do we now see the paper as white, like we did before? No, because there is no yellow light source that triggers the correction. We see the sheet on the photo as yellow, and quite likely we don't like it because of that.
What went wrong here? Should we tell the camera to correct for the yellow cast, just like our brain does? Or should we do this correction ourselvers, in postprocessing?
Fortunately, both are possible. Doing it in the camera requires a proper white balance (WB) setting. Provided that it is done carefully, this solves most if not all of the problem.
Unfortunately, some correction on the computer will always remain necessary, except maybe for those who only work in a highly controlled studio environment.
Remember, no matter how disciplined you are as a photographer, from time to time you may be asked to enhance other people's photos. For these cases only, being able to recognize and properly handle incorrect color is a must.
The same image under five different White Balance settings
To correct a cast, I suggest the following 4-step approach, identified by 4 C's:
Collect - Compare - Correct - Criticize.
If no correction necessary, move to step 4. Otherwise, continue step 3.
If all looks OK, you're finished. Otherwise, act on what's not good yet. If necessary, resample. Repeat the process.
This requires more explanation. What is meant by "desired color" and how can we know it? And what are these "reference values"?
I will discuss each step in detail. First, a bit of theory.
The classic example of a color cast detection, and probably the simplest case, is when an object that you know is neutral - white, grey or black - turns out to have a color in your photo. You may not *see* that color, but it can easily be traced: by the Photoshop Info panel. Sample a point on this neutral area, and read out the RGB values. If they read 120,120,140 then there is a good indication that we have a blue cast, and some blue must be removed. If they read 120,120,100 it's the other way round.
So what did we do here? For the neutrals, our "reference values" - well, not values but ratios - are R = G = B. That's what we would ideally see. A slight deviation of this (say, 120,118,122) is no big deal, but the values of the previous paragraph are definitely suspect.
The good part of this method is that the deviation that we see in the Info panel immediately tells us what the correction must be. The combination 120,110,100 suggests a slight decrease of the red and a slight increase of the blue.
For neutrals, this is straightforward. But we don't have neutrals in every image. Plus, the more elements we check, the more reliable the correction.
Fortunately, we have more options. Image elements for which we have reference ratios. They are not so decisive, but they can help.
Figure 0. Example image
Below I list the most important reference values. I will use figure 0 to give examples of each category.
The reference values
Already mentioned. See figure 1.
Usually, the difference between B and G is about the same as the difference between G and R. A typical combination is 180,210,240. When the sky gets lighter, the numbers get higher too and closer to each other. (Obviously, no reference values exist for a sky in setting or rising sun.) See figure 2.
This goes for all races. In my experience, G is closer to B than to R. A typical combination for Caucasian skin is 230,180,150. Asian skin is yellower, so the difference G-B is almost as high as the difference R-G. Black skin is of course darker, but also more saturated and redder: R-G is considerably bigger than G-B. See figure 3.
A large majority shows R much closer to G than to B. A typical combination is 140,160,80. However, much variety exists. Dried out green can get yellow, in which case R may get bigger than G. See figure 4.
Wood (not painted) always has a brown hue. A large variety is possible within that range. Light and dark, saturated and greyish, yellowish or reddish, all is possible. Dead wood moves towards grey. See figure 5.
Again, considerable variation is possible. Fur can be white or black, but it will never move to the green or blue side. What seems white or grey is often a creme-white or beige, very light brownish. The same is true for grey hair. See figure 6.
Brown or light brown. Rock is practically neutral, but never on the blue or green side. See figure 7.
This may be surprising as clouds are thought to be neutral. Lightest clouds are indeed white, but anything darker tends to pick up sky color, hence the ratio values. See figure 8.
Now let's go through the correction process. Remember: collect, compare, correct, criticize.
Step 1: Collect
Figure 1. The black door mat: 12/12/12
Figure 2. Blue sky: 211/228/248
Figure 3. Skin: 130/96/69
Figure 4. Greenery: 143/164/62
Figure 5. Wood: 122/107/87
Figure 6. Hair: 128/98/65
Figure 7. Brick: 128/109/73
Figure 8. Clouds: 242/243/247
Figure 9. Blue shirt: 20/50/76
Step 2: Compare
Figure 10. Color Sampler Tool
Figure 11. Set sample size
Figure 12. Info Panel options
Step 3: Correct
Alternatively, in the Levels window, select "Red" from the RGB drop-down (figure 14). Pick the middle triangle just below the histogram and move it to the right (to the left if you want to increase the red).
Step 4: Criticize
Figure 13. Curves adjustment targeted on Red.
Figure 14. Levels adjustment targeted on Red.
If not, then you have reason for more correction.
For now, try to find a compromise.
The main message of the Criticize step is that your eyes, i.e. artistic judgment, have the final word. The "by the numbers" approach is an effective way to trace a cast, but not more than that. If you are convinced that your final version is good, even though not all RGB values satisfy the reference ratios, you are done. Just make sure that you have at least seen a version where the RGB numbers have been corrected "by the numbers".
See below two versions of the example image on the top of this article: the original and the corrected. Do you notice the difference? Do you understand why it was corrected this way? And most importantly, which version do you prefer?
Gerald Bakker, 28 June 2015
Figure 15. Reduce opacity
Figure 16. Duplicate layer
Photoshop by the Numbers
Copyright © 2015-2017 Gerald Bakker. All Rights Reserved.