In this article we look at procedures for controlling our tonal range, specifically setting the two ends of our scale, the Highlight and Shadow, of our picture using the Photoshop Levels dialog box. The Highlight is the lightest part of our picture and the Shadow is the darkest. Everything in-between is classified as midtones (because they are in the "middle" of the two extremes). We will not work with the midtones in this article, for that is best addressed as Contrast Adjustment. In this article we work with Levels to set the Highlight and Shadows. When processing digital pictures in Photoshop, you should always set the Highlight and Shadows.
The objective of setting your highlight and shadow is to stretch out the density range as far as possible recalculating all midtone densities so that they will take advantage of as much of the entire density scale as possible. With more possible density tones available, there are more possible densities for your image pixels to be represented by. This gives your image the greatest range of tones between highlight and shadow giving you a better picture. Setting the highlight and shadow is also a correction technique for problem pictures where highlights are too dark, shadows too light and very flat picture without adequate input highlight or shadow.
Levels is one of a number of steps in the preparation of your digital camera images. Not only is the tonal range expanded to its maximum, this valuable step is also essential for the preparation of images for printing and output to image printing systems. You can set the point at where the highlight and shadows are in your image. This becomes an essential control because output systems, such as offset presses, require certain densities for the highlight and shadow. Levels is the tool for making these adjustments.
Highlights and shadows
We have to start with a discussion of highlights and shadows. The first thing to realize is that there should not be any parts of your picture that are paper white or solid black except for a few stray whites or blacks adjacent to pixels of other densities. Groups of pixels at these two extremes are incapable of communicating digital information that our eyes can we translate into the illusion of a pictorial image.
The highlight is the lightest part of your image. It is the density of the lightest pixel contained in your entire image. Wherever this may be on your histogram depends on the conditions when taking the picture. On a cloudy day the highlight may be darker and will need to be lightened. But the question is how white do we want our highlight? It would be a good to make the highlight as white as our output process will allow, all the way to pure white, but aesthetically and according to the subject of our picture, we may not want it that close to white. Not all scenes contain the actual color of white. If you so choose, you may leave the highlight a bit dark for that perfect effect. Notice that a highlight that is not at exactly zero can be some shade of color close to white such as a light pink, blue or any other almost white color.
When you set your highlight level, all pixels that have a density lighter than the point at which you set the target level will be made 0% white. Therefore, it is possible to set the highlight so that more densities are made perfectly white. That may help images that are intended to be very white. But be careful, whatever you do, don't let an entire area of your picture be 0% or 100%. No image carrying capacity will remain and the viewer will see it for what it is: areas of black or white. It is not possible for pixels to have densities in the negative numbers. Once they are pushed to 0% white, they cannot be returned to any other positive number without a lot of work!
The shadow is the darkest part of your picture. The shadow is the opposite of the highlight and all the concepts of your highlight also apply to the shadows except in reverse. Flat pictures may need to have the shadows stretched making for a deeper shadow which will improve the tone range. Again, be careful where you place the shadow. You may be making a number of pixels solid black ruining precious near shadow details. Darker parts of your picture must carry some detail and not be flat solid black.
The result of our levels operation is that the tonal range is stretched from almost 0% to almost 100%. This is very handy if your next step is to adjust Curves enhancing the contrast of the image. At this point we know that the input densities stretch all the way from 0% to 100% and that makes working with Curves much more efficient.
But Levels is far more technical than appears on the surface and leads us directly into some of the most important concepts of pre-press. Levels is an essential step for preparation of images for the printing process in that we must be very concerned about the exact highlight and shadow densities both of our input image and the final image on the press.
Beware of images where there are already plenty of densities at 0% and/or 100%. Although levels will help you expand your tonal range taking advantage of as many densities as we can, input images from your camera that are already stretched to the limits or beyond cannot be fixed with Levels. It is not possible to shrink the tonal range bringing the densities back onto the scale. Once image is forced to 0% or 100% the pixels lose all their image carrying data. Once gone, the data cannot be restored. Further, if it was never there in the first place, such as in an image with blown highlights, there is no way to separate the delicate tones found in the original scene. The opportunity is lost. If, when you first call the Levels dialog box, you see a large data mountain at either (or both) of the ends of the scales, this is an indication that there is a serious problem and the picture may be unusable. Study the picture carefully and see if the lost data makes much difference. Study carefully and see if the 0% or 100% densities are scattered all over the place for that kind of natural distribution that may be acceptable. However, if there is even a single patch (define "patch" as a group of about a dozen or more pixels connected together) of 0% or 100%, the image may be unusable.
Photoshop's Levels
About the best method of setting your highlight and shadow is Photoshop's Levels. With this dialog box you view the tonal data as a histogram where you can instantly tell the extents of your tonal range in a particular picture. All you have to do is adjust a couple of triangles matching them up with the ends of your tone range and your highlight and shadow is set. As an additional bonus, there is a third triangle, in the middle, which will allow you to adjust the contrast.
But where is the highlight and shadow in your picture/ At this point it doesn't matter. We only know that there is a highlight and shadow someplace on the picture and we want to make it lighter or darker. This renders Levels as being more technical and mathematical than intuitive. However, watch the image preview because you are stretching the densities as you set the highlight and shadow points. This is obviously going to have an impact on all those midtones that are going to be recalculated in the process. By watching your preview you may decide that you don't really want the highlight so light or the shadow so dark. You would discover that this particular image looks better if the highlight isn't so bright. At least you would know that!
At left, above, is the active part of the Photoshop 3 Levels dialog box. Newer versions are similar. Shown is a representation of the histogram for this image. Under the histogram are three triangles, the dark one (left) is to set the shadow point. The white one (right) sets the highlight. In the middle is a gray triangle for adjusting the midtones. This will have an effect on the overall contrast of the picture. It is beyond the range of this article to discuss contrast adjustment so for the purpose of this experiment we will leave the midtone triangle where it is or is automatically adjusted when moving the highlight and shadow triangles. If you plan to use Curves to set the contrast, do not adjust this triangle. If you don't have the time for Curves, a simple adjustment of the midtone (gray) triangle will help improve the contrast but will not give you the precise control that Curves offers.
Shown on the top of this illustration is the selection for the channel. The RGB channel will affect all channels somewhat equally and therefore keep the colors in balance. It is possible to adjust the individual channels but that may throw the color balance off. The Input Levels allow you to set the points of the triangles mathematically.
On the bottom of the chart is a gray scale with two triangles (for highlight and shadow) representing the output limits for the shadows and highlights. These adjustments are essential for pre-press work where halftone dot percentages can be set simply by inputting the required minimum highlight and maximum shadow percentages. Don't know what these targets are? Ask your pre-press technicians who will know the answers.
Here's how it works. When you first open the dialog box, you are confronted with the current Histogram (shown at left) for the image. You then set the highlight by moving the white triangle left until it is at the base of the data mountain on the right of the histogram. Then adjust the shadow toward the right until it meets the base of the data mountain. You have now set the levels stretching your highlight densities to about 0% and the shadow densities to about 100%. All densities in-between will be redistributed effectively stretching the entire density range. You may notice that the gray midtone triangle will move all by itself. As an added bonus, set the output levels to the requirements of your production process. If you are not sure what to be setting them to and will be sending the files to your service bureau or printer, do not set the output levels. Inform the service bureau with a written note that they are to set the output levels to their requirements! Failure to make them aware of this will result in a total disaster!
When you are finished with Levels. Be sure you like the look of the image and that it is improved. You may click OK and continue with other image processing tasks.
In this demonstration we intentionally move the highlight triangle too far into the data mountain. The result is that too many near highlight densities are forced to 0%. We cannot have minus numbers: all densities to the right of the triangle will be 0%! But the picture isn't too bad. Most of the white pixels are in the stonework blended in nicely. But we do see a very washed-out picture.
Here we move the shadow triangle too far to the right. Many of the near shadow details are now forced to being solid black. The picture looks underexposed, very dark and muddy. In this example, as well as the one above, notice how the midtone triangle moved all by itself to keep the stretch of the density range even. Although you may choose to work with it, we are not adjusting the midtones in this project.
In this example the two triangles are adjusted to the edge of the data mountain producing a nice image. But there are now densities of 0% and 100%. Most 0%'s are scattered in the stone highlight and the 100% pixels are in the black sneaker, lettering and shadow. No area is large enough to present a problem except for maybe the right side of the kid's right sneaker which has a number of connected 100% black pixels.
This final version, similar to the one above, shows almost no white pixels and very few black pixels. Setting the triangles slightly into the data mountains on both extremes has not proven to be serious.
The image has been resampled to a smaller size and then sharpened to bring out some of the detail. The Sharpening process will also push a number of pixels to white and black but that has not appeared to be a serious problem here.
Using Levels
This dreary rainy day picture shows a very flat histogram with no light densities. Although the picture appears dark, there aren't any dark shadow densities. The illusion of this picture is simply that the tone range is very narrow. It is flat and lacks contrast.
Another problem is that the sky is gray and not blue. The greens are a bit muddy but not too far from accurate. We're going to try and improve the sky color using the color channels available in Levels. This attempt at color correction is largely visual and intended more to salvage a poor picture than to produce a perfect image. It is also cheaper than driving back 500 miles on a sunny day!
We could use Curves to bring out the contrast but we would have to confine our operations to the midtones of the input densities and curve them to fill the output densities from highlight to shadow. The result will be a rather unusual looking curve. Further, we would have a difficult time finding our true highlight and shadow densities on the curves. Unlike Levels, we are not given a histogram to work with.
We start with the color channels and make any adjustments to the color balance before doing the overall highlight and shadow adjustments. At left is the blue channel where the highlight channel is brought to the left. The result is a blue sky. Dark, no? Remember that we haven't adjusted the overall highlight so we should see a darker blue sky than we would want in our finished picture.
But this adjustment leaves our trees in the background a little reddish. Be careful when doing color correcting with Levels or even curves. Many times an adjustment that fixes one problem creates another! Why did this happen? As we moved the highlight triangle to the left, the midtone triangle was forced to the left as well. This is an indication that all densities shifted to the left as they were being redistributed along the entire density range. But we only adjusted the highlights! True, but in doing so we redistributed the densities all the way to the shadow. The result throws the color balance off in the midtones showing a reddish cast to the trees.
![]()
Working on the Red channel we reduce the shadow moving the triangle to the right. Just enough to eliminate the red cast and no more. The results, at left, is a better balance of color and a much improved sky color.
The Green channel looks OK. It was tested by moving the triangles inward and watching the image preview for signs of improvement. There was none so the triangles were returned to the extremes of the scale and left there. Always play with these triangles just for the fun of it. You never know when you will observe a slight but important improvement to your image. If there is no improvement, return the triangles to their starting point. Where was it? Before you move the triangle, note the Input Levels number just above the histogram. As you move the triangles these numbers will also change.
We next work on the RGB Channel to adjust for our overall highlight and shadow densities. But look at the histogram! What happened? Now when we return from the individual channels we have a different histogram. Notice that the shadow densities are pushed all the way to 100%. Notice the white lines in the data mountains. And data mountains, now there are three! Why? The mountain on the far right is the blue densities that were formerly incorporated into the gray sky. Gray means all three colors line up. Now the middle mountain is the Red and Green densities contained in the sky while the Blues have been moved to the right. These are the result of making changes to the individual channels and, fortunately, Photoshop is updating the histogram so that we don't make adjustments based on obsolete data. At this point the histogram would be useless for it wouldn't match the preview and we would be thoroughly confused!
Because the Green shadows are redistributed all the way to 100%, we do not have a need to push them further. We will leave the shadow triangle right where it is. For the highlight, we will move the triangle to the edge of the rightmost data mountain. This will push all the sky densities toward 0% and make the blues the lightest. The result is a much lighter sky. We could have moved the triangle more to the left and the result would be a lighter sky, but this tone appeared adequate.
A contrast adjustment was made moving the middle triangle to the left. This improved some of the detail in the statue. The result is still something of a muddy grayish picture. But realize that this was easier to do than stop the rain and make the sun shine when taking the picture!
Our final irony is the Histogram after making the above Levels adjustments. At left is the Gray composite histogram which clearly does not look like the histogram we saw in the Levels dialog box. But realize that this is a composite histogram and the result of careful adjustments. The actual histogram, at left, shows only the gray composite. But look closely at the picture. Notice that there is no white area. The gray histogram confirms this. Our statue is dark, but there is no black. Again, we see this on the gray histogram.
![]()
We must look to the histograms of the individual channels to fully understand this image. Notice that the blues are right at the 0% highlight. This is what gives us our blue sky. If the green and red data channels were also at 0% we would have a gray sky, almost pure white. Perhaps we could have lightened the sky even more but it does have a pleasant color and this explains why. Notice that the shadows in the Red channel extend to the 100% shadow. This adjustment corrected the color cast in the shadows by adding red. Why? Taken on a cloudy rainy day the color of the light is cool enhancing the blues. By adding red we are warming the light in an attempt to compensate for the cool light. Did it work? Not well enough to make us think that this picture was taken in sunlight, but it is certainly better than what it was.
Conclusion
Levels is designed to help you control the densities along the entire tonal range from 0% highlight to 100% shadow. By the mere mouse movement on a couple of triangles you can redistribute densities as well as specify how light and/or dark you want your picture. An expanded tonal range will bring out more detail in your picture where more densities can be used to separate individual tones. Using this process, we can improve flat pictures and those taken in poor conditions.
It is perhaps a good procedure to set the highlight and shadow of every digital picture. It is not necessary to make changes to each of the channels but they do offer opportunities to improve color balance and minimize, if not eliminate any problems. Open the picture and work with the triangles. Evaluate the move both as an improvement to the picture and the consequences to the overall tonal range.
Realize that Levels brings you close to both your artistic objectives and technical limitations at the same time. It is difficult to work with levels and not be conscious of density ranges and tonal percentages. Levels should not be looked at merely as a matter of moving a couple of triangles around until you like the look of the picture. Being conscious of the numbers raises you to a higher level of craftsmanship. What on the surface seems like a simple tool, it can be quite difficult to use.
Wait, we're not done yet! What about those strange histograms as a result of adjusting the picture of Stonewall Jackson? If this really bothers you, you should upgrade to Photoshop 5.0 or higher. In 5.0 the histograms agree with each other and will show an accurate representation of the image data whether you are in Levels or are looking at the Levels dialog box. It is really much easier to work with. The above illustrations were created in Photoshop 3.0 show that the Histogram algorithms need a bit of work to be completely reliable. This was a problem but is now corrected. Does this mean that Photoshop 3.0 is no good? No, just that there was a problem with the Histograms. The results of repeating the experiment in 5.0 were identical to 3.0.