header

In this tutorual, we'll looking at color adjustments further.

In the previous tutorial, I discussed how computer monitors use the RGB Color set. However, when working with Photoshop there's a second set of color terms that are necessary to understand and these are called the HSB model. A computer image is made of small dots: "picture elements" or pixels. Each pixel's "color" is determined by three factors - Hue, Saturation and Brightness.

color wheel

The term 'color' is really an expression of a combination of hue, saturation level and brightness level.

Hue is the 'color' itself but pure hues have neither black nor white added to modify them. In the RGB colorwheel to the left the hues are at the far outside of the circle. Not surprisingly they are measured in 360 degrees with 0 being pure red - you can see a little tag mark that marks both middle gray and the point on the wheel that marks red.

Saturation is the measure of how much white is present in the pixel - this gives us all the tints as we add white which are defined as being less saturated. Generally speaking, we might think of saturation as being the intensity of the color. Just like we have saturated fats, with too many "bad" fats, there are saturated colors which are sometimes too intense or too harsh to appear natural.

Brightness is the measure of how much black is in the pixel - as we add black this gives us the shades.

Many of the adjustment tools in Photoshop work on only one of these three areas, so that we can, for instance, increase the brightness of a color without changing the hue.

If you look at the classic Photoshop color picker below you'll see these color references listed at the right as H, S and B.

You can see that Hue is measured in degrees and saturation and brightness by percentages. There are a couple of other things - brightness runs up and down the color block, saturation levels left and right. Notice the "read outs" of HSB values, RGB values and CYMK values. (CYMK is the color set used by printers which has its own set of primary colors; yellow, magenta and cyan.) The bottom code with the # in front shows you the HTML code values for use on a web page. The little caution symbol right next to Cancel is the gamut warning - it means that if you convert the present color from RGB to CYMK it won't appear correctly, this tone can't be produced by standard printing - more on CYMK later.
color picker

one

Now, let's apply this to one of Photoshop's adjustment tools.

We'll start off this tutorial with the Levels Adjustment Tool.

First, let's look at two images taken seconds apart. Because the orientation of the camera changed from vertical to horizontal between the two, more of the white piping and bright soil appeared and changed the automatic meter reading for exposure.

The color of the image at the left is pretty near spot on.

(And, boy, didn't I love seeing something like this bloom with its first flower open in the seedling beds yesterday morning!)

The image that appears below, I'm going to attempt to change to look like the image at the left.

Now, in looking at the two I need to decide what makes them different.

The lower image is less saturated, it has more white in all the hues - the flower and the foliage appear washed out. Even the backs of the stamens aren't as dark.

Now, let me state here that there are a number of ways to fix this, or attempt to fix this and other problems. We could use the Exposure Adjustment Tool, we could use the Auto Levels Tool which sometimes does a great job too. I encourage you to try playing with all the adjustment tools to see what they do, since most have a Preview option you can see the results of your toying with the tool and experiment to learn which tool works best for each situation.

two

I'm going to first open the Levels Adjustment Tool with the top image selected. To access this tool, go to the Image Menu - then select Adjustments, then select Levels... This dialog below appears:

levels

The graph like chart is called a histogram. It shows the distribution of light and dark pixels throughout the image, with darkest to the left, brightest to the right.

A couple of things should be noticed here. First, there are spike lines at both the far left and right, meaning there are areas of both black and white in the top image - not so in the lower image because we know it appears washed out. I would expect to see less dark area in the histogram in the image just above.

The key adjustment you can make in this tool is with the small triangles beneath the histogram - they can be moved inward and you can see the results as you make the adjustment as long as the preview box is checked.

You can use the eye dropper tools to pick the darkest, and brightest parts of an image and set the center point too.


level two


Here's the Histogram for the horizontal image - note as expected there are far fewer pixels present in the darker levels, but still a spike on the white that goes right to the top.

Now, to adjust...

What I did here was move the left triangle inward until it encounters the first part of the slope line on the histogram going upward - this shifts the output levels below and tells it to put black at the point were the left slider triangle appears - we've just recovered some of our "missing" black areas - try it and see!

Then, since I have preview enabled, I also moved the center slider to the right as well, I see that high point on the curve where most of the pixels are and I start to move this toward that, watching the image as I go.


level 3


Now, I tried my best to get as close as I could to the vertical image's flower color.

Here's the settings I used.

Down below is the same image with just this level adjustment applied.

It's certainly closer but I feel that the colors are a bit too saturated, too intense in the flower. This is a subjective judgement when doing this by eye.

Thankfully, Photoshop also has a Hue/Saturation Adjustment Tool as well, so this gives me a good excuse to introduce you to that tool this week as well.

So, down below the image you can see that dialog. It's found in the Image-Adjustments menu as well.

image c
HueSaturation


Here, in a small single dialog, you can adjust all three parts of the HSB model settings. Wow!

(Although they relabeled Brightness to Lightness, as if that's clearer!? I think they'd be better off being consistant with their terminology, this program's complicated enough without them changing the labeling!)

(See Dr. Bob Stanton's excellent addendum, that explains this, below - he's right!)

Go ahead and play and watch the preview. You just return each slider to 0 to get back to the beginning value for each area.

In this case, I had decided that there were some colors in the flower that appeared too intense to my eye, so I played with the Saturation Level and chose -11. Results below.

d

Well, not exactly - since I was playing I'll tell you about two more tools I used here. I felt the image was still a bit too light, so I chose the Brightness/Contrast Tool (ah, see they DO use brightness again, but I honestly don't know what the difference between lightness and brightness is - they appear to do the same thing. (editor's note - see addendum below)). I also felt the image wasn't quite yellow enough so I went into the Image-Adjustments-Color Balance Tool and added just a bit more overall yellow. This works just like the Variations from the last tutorial, but no color wheel dialog or sample images for comparison. The resulting image isn't exactly like the first one, but it's now a lot closer.


Here's some additional examples using the Levels Adjustment Tool. What's below are simply the original image, with its histogram from the Levels dialog, then the 'corrected' image with the histogram for that. I just cropped the histogram itself from the dialog to save space on the page:

before 2


In this image there are almost no light levels at all, taken against a gray house in shade. All that gray accounts for the spike mid-graph. All the flower values to the right, foliage to the left.

after 1


hist 2

By moving the right adjustment triangle in I restored some lighter values and by moving the center left to the spike I lightened the wall a bit too.

Notice that the hues don't change much, just the levels.

This is Hemerocallis 'Atlanta Full House'.


before 2

hist3

In this image all the background levels dominate. Again, despite the whiter nature of the petal color there are no white level values in the image.

after 2


hist4

Here I again moved the right slider in and adjusted the center to get more detail in the eye of the cultivar.

Arguably, the upper image is fine, but as I ran through the level adjustments it is a good example of what kind of adjustments can be made.

This cultivar is H. 'Siloam Ury Winniford'.

My final comment is that all the adjustment tools come with a Preview option - if you can arrange the dialog box on your screen so you can see the image, as you make adjustments you can see the results live on the image in real time. You can reject any changes by "Cancel"-ing the adjustment dialog. So, I encourge you to try the Levels Adjustment Tool and play with it until you get a feel for what it can do. Try opening a number of different images, look at the histograms and try to analyze what causes the spikes, or distributions you see there. Move the sliders, try using the eye droppers to sample the darkest and lightest parts of the image and see what, if any, effect this has on the Preview.

Lastly, the most effective adjustments are small and subtle. The more dramatic the adjustment, the more likely it is to look artificial.

Next time, we'll look at one last adjustment tool before exploring some basic things about Photoshop layers.

Tim Fehr - Eau Claire, WI

© 2007 by Tim Fehr - all rights reserved.

This addendum was written by Dr. Bob Stanton - AHS member and Professor of Mathematics and Computer Science at St. Johns University, NY.

Addendum to Tutorial five.

Tim suggested that, as a mathematician, I could add some background to this tutorial. Nothing that I can say could improve on Tim's excellent lessons in the use of Photoshop to perform color adjustments to an image. The purpose of this addendum is to give some description of the way that computers and computer software handle color.

As Tim explained in Tutorial four, the primary colors of a computer monitor are red, green and blue. To get the color for a pixel, the intensity of each primary color is stored in the computer's memory. It is typical in modern systems for each color to have a range of 256 levels of intensity, represented by the integers 0 through 255. This allows over 16 million colors to be represented. (The exact number is found by computing 256 cubed. I can recall the days when only 64 colors could be represented.)

While the RGB (Red, Green, Blue) system is excellent for computer representation, it is not the way humans think of colors. Not many people would associate a pale yellow with the numbers (255, 255, 192). As mentioned at the beginning of this Tutorial, color is a combination of hue, saturation and brightness. Hue is the actual color being represented, and, as Tim mentioned earlier, is expressed in degrees from 0 to 360, rotating around a circle. Numerically, red is represented as 0 or equivalently, 360 degrees. The colors progress at 60 degree intervals through yellow, green, cyan, blue, magenta and back to red. Saturation and brightness are represented as percentages, from 0 to 100%. These attributes are open to interpretation, and my view of these differs from Tim's; I consider saturation to represent the "purity" of a color, and brightness to represent the amount of white. So something like RGB = (128, 0, 0) would represent a pure, although dark red; 100% saturation. However, RGB = (128, 64, 64) would be a muddy red, having some grey intermixed; saturation here might be 50%. (But see the end of this discussion.) At the extremes, RGB = (255, 255, 255), pure white, would have 100% brightness. RGB = (0, 0, 0), pure black, would have 0% brightness. Both pure white and pure black would have 0% saturation.

However, the situation are complicated by the fact that there are two different systems that measure hue, saturation and brightness. Both represent hue in the same way, but there are different ways of describing saturation and brightness. Each system has its own strengths and drawbacks. Photoshop, and other image manipulation programs, take advantage of the two systems by using both, depending on the task involved. One is called HSV, for hue, saturation and value and is used by Photoshop for color selection. Photoshop uses B for brightness rather than value. This system does an excellent job in representing saturation, but seems to fall short in the brightness category. The other system is HSL, for hue, saturation and lightness. This is the system used by the Hue/Saturation tool mentioned in Tutorial five. This does very well in representing lightness, but seems to be deficient in terms of saturation. Tim mentioned that Photoshop uses the two different words Brightness and Lightness in different dialogs. They do this because they are using the two different systems. Unfortunately, the same word, "saturation", is used in both systems, for two different things.

One can find more information about these systems, including geometric representations and mathematical formulas, at http://en.wikipedia.org/wiki/HSL_color_space. For a less mathematical, but very instructive exercise, go to http://aviary.com/home, and click on the Toucan tab. (My thanks to Tim for alerting me to this site.) Here one can move sliders, and see the effect of a change in any one attribute on the other systems. In particular, one can see that value and lightness are not the same, as well as the fact the two different attributes named saturation are different. For example, the color RGB = (128, 64, 64) has a saturation of 50% in the HSV system, but 33% in HSL.

The representation of color on the computer is an interesting topic. While not perfect, the systems used provide a good interface between computer implementation and human understanding.

Dr. Robert O. Stanton
Mathematics and Computer Science
St. John's University
8000 Utopia Parkway
Jamaica, NY 11439

Addendum ©2009 by Dr. Robert O. Stanton, all rights reserved.

footer