Sub topic 9
Matching brightness and contrast with Levels and Curves
This chapter assumes you can make selections and layer masks, add adjustment layers, and read the Layers panel. It also assumes you know what a blend mode does. You should already have a foreground element placed in a non-destructive setup, with Smart Objects and layer masks, and you should have studied the light in your background plate.
Light direction and colour are only half the job. If the foreground is brighter, darker, flatter, or punchier than the background, the eye notices even when the shadows point the right way. Tonal matching fixes this with three controls: the black point, the white point, and the midtone contrast.
The three numbers that define a tonal range
Every photo has a darkest area and a lightest area that carry meaning.
- Black point: the darkest value in the image that still holds detail. In a hazy outdoor photo it may be a dark grey, not true black.
- White point: the lightest value that still holds detail, usually a bright highlight and not a light source.
- Midtone contrast: how steeply tones change between those two ends. A steep change looks punchy. A shallow change looks flat or foggy.
A cut-out taken in a studio often has a true black and a bright white. A background shot on an overcast day may have a black point near 30 and a white point near 220 on the 0 to 255 scale. Place the studio subject into that scene unchanged and its blacks look like holes and its highlights glow.
Measure before you adjust
Guessing leads to repeated tweaking. Measure the background first.
- Open the Info panel (Window > Info) and set one readout to Grayscale or RGB.
- Add a temporary Threshold adjustment layer above the background. Drag the slider to the far left, then slowly right. The first pixels that turn black are the darkest areas. Note where they are.
- Drag the slider to the far right, then slowly left. The first pixels that turn white are the brightest areas.
- Delete the Threshold layer. With the Color Sampler tool (nested under the Eyedropper), click those spots to pin up to four samples. Their values stay visible in the Info panel while you work.
Repeat on the foreground. You now have target numbers: for example, background black near 28 and white near 225, foreground black at 2 and white at 255.
Levels: set the endpoints
Levels is the quickest way to match black and white points. Add it as an adjustment layer, then clip it to the foreground by choosing the clipping icon at the bottom of the Properties panel, or by holding Alt (Windows) or Option (Mac) and clicking between the two layers. A Levels layer that is not clipped changes everything beneath it, including your background.
The Levels dialog has two sets of sliders.
- Input sliders (above the histogram) remap the existing tones. Dragging the black input slider right makes darks darker.
- Output sliders (the gradient bar below) limit the range the result can reach. Dragging the black output slider right lifts the blacks to a grey. Dragging the white output slider left dims the highlights.
For a studio subject going into a hazy scene, use the output sliders. Set the black output to the background's black value (about 28) and the white output to its white value (about 225). The foreground range now matches the plate.
Use the input sliders in the opposite case. If the foreground is flatter than the background, drag the input black and white sliders inward until they meet the histogram edges, then set the output sliders to the target.
The middle slider (gamma) shifts midtone brightness without moving the endpoints. Move it left to darken midtones and right to brighten them in the opposite direction, as the histogram dictates. Watch the face, fabric, or surface you want to match, not the histogram alone.
Curves: shape the contrast
Levels moves the endpoints and one midtone point. Curves lets you control any part of the range, so use it after Levels for the finer match.
The graph runs from shadows at the lower left to highlights at the upper right. The diagonal line means no change. Click on the line to add a point, then drag it.
- A point above the diagonal brightens that tonal range. A point below darkens it.
- A steeper section of the curve means more contrast in that range. A flatter section means less.
- An S-shaped curve (shadows pulled down, highlights pushed up) adds contrast. An inverted S reduces it.
Match contrast by comparing how the background transitions from shadow to light. A soft overcast scene needs a gentle curve. A hard midday scene needs a steeper one. Anchor the middle of the curve with a point, then adjust the shadow and highlight points separately so one tonal zone does not drag the other.
To raise the black point with Curves, drag the lower-left endpoint straight up. To lower the white point, drag the upper-right endpoint straight down. This is the same operation as Levels output sliders. Using Levels for endpoints and Curves for shape keeps each layer's job clear and easy to revisit.
Avoid colour shifts with Luminosity
Curves and Levels act on the RGB channels together by default. Strong contrast moves saturation and hue along with brightness. If you want to change tone without changing colour, set the adjustment layer's blend mode to Luminosity. Then colour is handled separately in the next chapter. Do the reverse for colour layers by setting them to Color.
Apply it unevenly with masks
Light rarely hits a subject evenly. A person standing in dappled light has bright and dark zones. If one overall adjustment matches the face but leaves the legs too bright, paint on the adjustment layer's mask.
- Select the layer mask on the clipped adjustment layer.
- Fill it with black to hide the adjustment, then paint white with a soft brush at 20 to 30 percent opacity where you want the effect.
- Build up gradually. Hard transitions in the mask show as visible bands.
For a gradual falloff, such as a subject that is darker at the bottom because it is shaded by a wall, use a Gradient tool on the mask in place of a brush.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Background also changes when you adjust | Adjustment layer is not clipped | Clip it to the foreground layer |
| Blacks look like crushed holes | Black point is darker than the plate's | Raise the black output slider to the measured value |
| Subject glows against the scene | White point is brighter than the plate's | Lower the white output slider or pull the curve's top endpoint down |
| Subject looks flat after matching | Output range compressed but midtones not reshaped | Add a gentle S curve in Curves |
| Colours turn garish after contrast boost | Curve is acting on RGB together | Set the layer to Luminosity |
| Visible banding or posterised patches | Heavy edits on 8-bit data | Work in 16-bit (Image > Mode > 16 Bits/Channel) |
Check in context
Judge the match by zooming out, not by pixel values alone. View the image at 25 to 50 percent, or squint at it. Mismatched brightness shows up as a subject that jumps forward or sinks into a hole. Toggle the adjustment layers' visibility on and off to see how far you have moved. Adjust a little, step back, and repeat. Measurements get you close, and your eye does the last 10 percent.
Exercise
A studio-lit cut-out has a black point of 0 and a white point of 255. The background plate, shot on a hazy morning, has a black point near 40 and a white point near 215. Which Levels controls do you use to match the cut-out, and what must you do so the background is not affected?
Show answer
Add a Levels adjustment layer and set the black output slider to about 40 and the white output slider to about 215, which compresses the cut-out's range to the plate's. Clip the Levels layer to the cut-out layer (Alt/Option-click between the layers, or use the clipping icon in Properties) so it does not change the background. Then refine midtone contrast with a clipped Curves layer.
Exercise
After matching endpoints, the subject's colours look oversaturated when you add an S curve in Curves. What setting limits the curve to brightness changes only?
Show answer
Set the Curves adjustment layer's blend mode to Luminosity. This applies the tonal change without altering hue and saturation, which you then adjust separately.