Exposure and Contrast adjustments part 2: Levels
Of swimming and jumping
“If you want to learn to swim, jump into the deep end.” That’s definitely not an advice from a swimming instructor. In many places in the world, learning to swim is a matter of life and death. Never let young children jump into the deep end of a swimming pool, unless they are well protected with a flotation device. Sure, anyone learning to swim has to jump into the deep end one day or another. But it’s better not to start there.
The quote comes from one of Dan Margulis’ Professional Photoshop books, in a context where he compares Levels with Curves. Curves (the deep end) are more powerful than Levels (the shallow end), so why waste time with Levels? Well, my answer to that rethorical question is: if you start color correcting with Curves, you run the risk of, well, not drowning, but losing your way quickly. A Curves adjustment is less intuitive to use than Levels, just like Levels is harder to master than the Brightness/Contrast sliders of the previous article. The best way to learn something difficult is to start with the easy exercises. So that’s what I do: first, study Brightness/Contrast, then Levels, then Curves. It’s instructive to see what some of these adjustments are able to accomplish which others cannot. You just started reading the second article in that series. Let’s have a look at the Levels adjustment then. For the novice Photoshopper, Levels has its own share of obstacles in store, as we’ll see.
Almost empty swimming pool
Open an image and add a Levels adjustment layer. I will work from the image of figure 1. Figure 2 is the popup that Photoshop presents with the new layer.
Figure 1. Example image
Figure 2. Levels Properties window
Quite a difference with the simple Brightness/Contrast window: the user sees an elaborate dashboard containing two drop-downs, an Auto button, three eydroppers, a histogram, two sliders with five control points and five numeric input fields. It’s too much to fully cover in one article, so I will be somewhat selective in my discussions.
By far the most important controls of the Levels dialog are the three triangle control points – black, gray and white – right below the histogram; and to a lesser extent, the two similar controls further down along the gradient line. These control points can be slided horizontally. Figure 3 shows the possible movements.
Figure 3. Triangle controls on the Levels window
One could say that the two outer points below the histogram – black and white – function like tongs. By moving them inwards along the histogram, they can squeeze image data into a smaller range, so that contrast is boosted. Moving the black slider right makes the image darker. Moving the white slider left makes the image lighter. Be careful of such moves: any image data left of the black control point will become pitch black by this move, and pixels right of the white triangle will become white.
The middle (gray) control is a bit harder to explain. See it as a point where image data is exactly middle gray. By moving it left, image data is forced right of that midpoint. Hence, the image will get lighter. By moving it right, the image will get darker. This way of working is rather less intuitive than the simple sliders of the Brightness/Contrast adjustment: as if an extra level of abstraction has been built in. No material for lesson one, so to say. Move the slider right to make the image darker, and left to make it lighter. It took me a while to get used to that.
(By now you will no doubt have noticed that the three entry fields right below the three control points are connected with them. Slide a control point and the value in the corresponding field changes. Update a value and the triangle moves accordingly.)
Somewhat less eye-catching is the other set: two triangle control points and two more entry fields labeled “Output Levels”. Think of those as the outer controls moving outwards instead of inwards. One forces the darkest point of the image lighter, the other the lightest point darker – and the rest of the image moves with it. Set the black output level to 50, and all pixels have their value forced to 50 or higher. Set the white output level to 200, and no pixel will have a value above 200. This is not an adjustment you will use very often as it always reduces contrast. The only occasion I sometimes use this is when I deliberately make an image look very pale in order to superimpose a text over it.
Figure 4. Left: Levels move. Right: resulting image with text superimposed.
Figure 4 shows an example where I set the left (black) output level to 100, and what the resulting image looks like. Similarly, moving the right control leftwards makes the image very dark and could be used to add a white or light colored text over it.
Levels by the numbers
A levels adjustment is, just like the current implementation of Brightness/Contrast, always gradual. You move a control, pixels get lighter or darker, and the effect is always stronger close to where the control resides and weaker further away from it. Let’s have a look at some numbers, taking the triplet of controls just below the histogram as examples:
The most useful application of the black and white controls is to correct range. Let’s say, the darkest point of an image has RGB values of about 30. Assume that the desired black point is 5 for each channel. Then the simple fix would be to set the black point control to 25.
But wait… what if the darkest values of the three channel values are different? Red 10, Green 20 and Blue 30? How to correct that? Read on.
Per channel adjustments
Right above the histogram on the Levels adjustment Properties popup is a drop-down control. It has no title; we can refer to it by the value that is always shown when the window opens: RGB. Click on it and the other possible values become visible: Red, Green and Blue. This is by far the most distinguishing feature when comparing Levels with Brightness/Contrast. The RGB drop-down gives us the possibility to manipulate individual channel values. See figure 5.
Figure 5. RGB drop-down
In all examples that I gave until now, the three components Red, Green and Blue were equally adjusted. But the RGB drop-down provides the option to break this restriction. Choose one of the individual channels and any subsequent update applies to this channel only. Instead of merely adjusting lightness values, we can thus manipulate and correct color imbalances. Imagine we would judge the image of figure 1 too yellow, this is how we can proceed to fix that:
That’s it! See figure 6 for the result.
Figure 6. Correction in the Blue channel, and resulting image
Simple, but… there is a severe limitation in this procedure. If the blue cast is limited to the darker areas of the image, we can’t get away with just a simple Levels adjustment. Some masking would be required. Levels can only go so far to perform its corrections. It offers five control points – but no way to add another one if needed.
I’m sure you won’t find it difficult how to fix a range problem where different corrections per channel are required. Let’s start from the example of the previous paragraph: the lowest values of Red, Green and Blue in a given image are 10, 20 and 30 resp. Assume we want them to be 5 each. Proceed as follows:
That’s it. Be aware that we now don’t necessarily have one pixel with each of Red, Green and Blue set to 5. The value of 5 that we fixed for Red, Green and Blue can appear at three different places in the image. Setting one black point to (5,5,5) requires a different procedure.
Eyedroppers, auto button and auto-correct options
There is so much to write about the usage of the eyedroppers (three icons left of the histogram), the Auto button and the Auto Options menu item on the Levels Properties window, that I decided to dedicate a separate article about all these. They are connected with each other, they are connected with the Curves adjustment, and they are connected with Photoshop’s Auto Tone, Auto Contrast and Auto Color menu actions. Better discuss them separately.
The connection with Brightness/Contrast
An interesting exercise is to compare the mechanics of the Brightness/Contrast adjustment with what Levels can accomplish. I think it’s clear now that Levels is the more powerful of the two, so let’s try to map the various Brightness/Contrast moves on their Levels equivalents.
1. With Use Legacy switched on, move the Brightness slider right (say, to 20). This is equivalent to moving the upper white control 20 positions left (to 235) and the lower black control 20 positions right (to 20). See figure 7.
Figure 7. The adjustments left and right give equal results.
2. With Use Legacy switched on, move the Brightness slider left (say, to -20). This is equivalent to moving the upper black control 20 positions right (to 20) and the lower white control 20 positions left (to 235).
3. With Use Legacy switched on, move the Contrast slider right (say, to 20). This is almost equivalent to moving both the upper black and white sliders inwards, about 25 positions.
4. With Use Legacy switched on, move the Contrast slider left (say, to -20). This is almost equivalent to moving both the lower black and white sliders inwards, about 25 positions. See figure 8.
Figure 8. The adjustments left and right give almost equal results.
5. With Use Legacy switched off, move the Brightness slider right (say, to 20). The best way to mimic this in Levels is to move the middle (gray) control leftwards, but it’s still quite different. Brightness/Contrast seems to retain better contrast overall, the Levels adjustment renders the image flatter.
6. With Use Legacy switched off, move the Brightness slider left (say, to -20). The closest move in Levels is to move the middle (gray) control rightwards, but it’s really not the same. In this case, Levels seems to be the better choice, but this may well be image-dependent. See figure 9.
Figure 9. The adjustments left and right give rather different results.
7. With Use Legacy switched off, move the Contrast slider right (say, to 20). This particular move: increase midtone contrast while retaining white and black points, is not possible in Levels!
8. With Use Legacy switched off, move the Contrast slider left (say, to -20). Again, this adjustment is not possible in Levels.
Of course, there are things possible in Levels that Brightness/Contrast cannot do, the most important being the separation of color channels.
Comparing Brightness/Contrast with Levels is like comparing a boat trip with a swim. The aim is to cross a river. Moving by boat is convenient and quick, but it will only bring you at some predefined places. Swimming is more strenuous, but it definitely gives more freedom over the route to take. At close inspection however, still not every route is feasible. The next article will examine the most powerful of all Exposure and Contrast adjustments: Curves. I promise that Curves will bring you any place that Brightness/Contrast and Levels can, and more!
Gerald Bakker, 16 June 2020
Photoshop by the Numbers
Copyright © 2015-2023 Gerald Bakker. All Rights Reserved.