Sub topic 5
Curves: shaping contrast with control points
This chapter assumes you can create an adjustment layer and open its Properties panel. It also assumes you have read the histogram chapter and know what the Levels sliders do. Levels gives you three controls: black point, white point, and midtone gamma. Curves gives you as many controls as you want, placed anywhere along the tonal range.
What a curve is
A Curves adjustment is a lookup table. For every possible input value, from 0 (black) to 255 (white) in an 8-bit channel, the curve defines one output value. The graph shows this directly:
- The horizontal axis is the input value, the brightness the pixel has now.
- The vertical axis is the output value, the brightness it will have after the adjustment.
- The default diagonal line from bottom left to top right maps every input to itself, so nothing changes.
You change the image by adding control points to the line and dragging them. A point dragged above the diagonal brightens the tones around it. A point dragged below the diagonal darkens them.
Levels is a special case of this. Moving the black point slider is the same as moving the curve's bottom end, and moving the midtone slider bends the line with a gamma shape. Curves lets you build any shape, including shapes Levels cannot make.
The model in code
The following function is a simplified version of what Curves does. It uses straight segments between control points. Photoshop draws a smooth spline through them, so real results are rounder, but the idea is the same.
def curve(value, points):
"""Look up an 8-bit value on a curve defined by (input, output) control points.
Uses straight segments between points; Photoshop draws a smooth spline instead."""
pts = sorted(points)
for (x0, y0), (x1, y1) in zip(pts, pts[1:]):
if x0 <= value <= x1:
return y0 + (y1 - y0) * (value - x0) / (x1 - x0)
raise ValueError("value is outside the curve's input range")
# A simple S-curve: darker shadows, brighter highlights, midtone unchanged.
s_curve = [(0, 0), (64, 48), (192, 208), (255, 255)]
assert curve(128, s_curve) == 128Check a few values by hand. Input 64 maps to 48, so shadows get darker. Input 192 maps to 208, so highlights get brighter. Input 128 is unchanged. The segment between 64 and 192 is steeper than the diagonal: it climbs 160 output levels over 128 input levels, a slope of 1.25. A steeper slope spreads nearby input values further apart, and that is what contrast means in Curves.
Reading slope as contrast
Slope is the most useful idea in this chapter. At any point on the curve:
| Slope of the curve | Effect on tones at that point |
|---|---|
| Steeper than the diagonal (greater than 1) | Contrast increases. Nearby values are pushed apart. |
| Same as the diagonal (equal to 1) | No change in contrast. |
| Shallower than the diagonal (less than 1) | Contrast decreases. Nearby values are squeezed together. |
| Flat (horizontal) | Many input values collapse into one output value. Detail is lost. |
An S-curve is steep in the middle and shallow at both ends. It adds contrast to the midtones and compresses the extreme shadows and highlights. That is why an S-curve looks punchy without necessarily clipping the image.
Creating a Curves adjustment layer
- Open the Adjustments panel and click the Curves icon, or choose Layer > New Adjustment Layer > Curves.
- In the Properties panel, you see the graph with a histogram of the image behind it. Use that histogram to see where your tones are concentrated.
- Click on the diagonal line to add a control point. Drag it up, down, left, or right. You can also select a point and use the arrow keys for small steps, and the Input and Output fields show exact numbers.
- To remove a point, drag it off the graph or select it and press Delete.
You can add up to 16 points on a curve. In most corrections you need two to four.
Point-on-image sampling
The hand icon with the small arrows, at the left of the Properties panel, switches on the on-image adjustment mode. Click on a tone in the picture and drag up or down. Photoshop adds a point at that tone's position on the curve and moves it for you. This is the fastest way to adjust a particular tone, such as a face or a sky, because you do not need to guess where it sits on the graph.
Pressing Ctrl (Windows) or Cmd (macOS) and clicking in the image, with the Curves panel open, adds a point for the pixel under the cursor without moving it. This is useful for locking in neighboring tones before you adjust one of them.
Anchoring points to control the shape
Each control point affects its neighbors, because the spline must pass smoothly through every point. If you pull one point up, the line bulges and the area around it changes too. To keep the effect local to the tonal range you care about, add anchor points that you do not move.
For example, to brighten only the midtones:
- Click the diagonal at input 64 and leave it where it is. This protects the shadows.
- Click at input 192 and leave it as well. This protects the highlights.
- Click at input 128 and drag it up.
The curve now rises between the two anchors and returns to the diagonal outside them. The anchors work like pins in a rubber band.
The common curve shapes
| Shape | Points | Result |
|---|---|---|
| S-curve | Pull shadows down, highlights up | More contrast |
| Inverse S-curve | Pull shadows up, highlights down | Flatter, lower contrast |
| Upward bow | Drag the midpoint up | Brighter image |
| Downward bow | Drag the midpoint down | Darker image |
| Lifted black point | Raise the bottom-left end | Faded, matte look |
| Lowered white point | Lower the top-right end | Dimmer highlights, no pure white |
The "lifted black point" shape is a deliberate style choice. The darkest value in the image becomes a dark gray instead of black, which gives a film-like fade. Do this only when you want that look, because it also removes true blacks from the print or screen.
Black and white points in Curves
The two end points of the curve work like the Levels end sliders. Dragging the bottom-left point to the right sets a new black point. Every input value at or below that position becomes 0. Dragging the top-right point to the left sets a new white point in the same way.
This means you can do a Levels-style correction inside Curves. Use that when you want to set the endpoints and shape the midtones in one place. If you only need the endpoints and a midtone brightness change, Levels is simpler and less likely to introduce an odd bend.
Curves on individual channels
The RGB drop-down at the top of the graph lets you edit the composite or a single channel: Red, Green, or Blue. A curve on one channel changes only that color's contribution to each pixel.
- Raising the Red curve adds red to those tones. Lowering it adds cyan, the opposite of red.
- Raising the Green curve adds green. Lowering it adds magenta.
- Raising the Blue curve adds blue. Lowering it adds yellow.
Because each curve acts on a tonal range, you can tint shadows and highlights differently. Pulling the Blue curve up in the shadows and down in the highlights gives a cool-shadow, warm-highlight look. A later chapter uses this to remove color casts. For now, remember that composite changes affect brightness and contrast, while channel changes affect color balance.
Blend mode for tone-only changes
A composite S-curve also changes saturation. When contrast rises, colors in the shadows and highlights shift and usually look more vivid, and sometimes they look wrong. To change brightness and contrast without touching color, set the blend mode of the Curves layer to Luminosity. The curve then affects only the lightness of each pixel, and the color information from the layers below stays as it was. Blend modes are covered in detail later in this tutorial.
Common errors
- Steep segments that posterize. A very steep section spreads a narrow range of input values across a wide output range. On a photo with limited tonal data, this shows up as visible bands in smooth areas such as skies. Work at 16 bits per channel when you can, and avoid extreme slopes.
- Flat sections that lose detail. A horizontal part of the curve sends many inputs to one output. Highlights or shadows in that range become a single flat tone. Check the image at 100 percent zoom after you push the ends.
- Curves that cross the diagonal oddly. A curve that goes down as input goes up (a section with negative slope) inverts tones. It produces solarized, unnatural results. If you see strange reversals, look for a point that has been dragged past its neighbor.
- Too many points. More points make it harder to predict the shape and easier to introduce kinks. Start with two points and add more only when a specific tone needs control.
- Editing the wrong channel. If the colors shift when you expected only a brightness change, check that the drop-down still says RGB.
- Judging by the thumbnail. Judge the effect on the image at a size where you can see the pixels. Toggle the layer's visibility (the eye icon) to compare before and after.
Levels or Curves?
Choose Levels when the problem is endpoints or overall midtone brightness, and you want a quick, predictable result. Choose Curves when the problem is contrast in a specific tonal range, or when you need to shape shadows, midtones, and highlights independently. Because Curves is a superset of Levels, you can do both jobs there, but the extra freedom is also extra ways to make a mistake.
Exercise
A curve has control points at (0, 0), (64, 40), (192, 220), and (255, 255). Using straight segments between the points, what output does input 128 give, and is the contrast in the midtones increased or decreased compared with the diagonal?
Show answer
Input 128 lies on the segment from (64, 40) to (192, 220). The segment rises 180 output levels over 128 input levels. The output is 40 + 180 × (128 − 64) / 128 = 40 + 90 = 130. The slope is 180 / 128, about 1.41, which is greater than 1, so midtone contrast is increased.
Exercise
You apply a strong S-curve to a photo and the colors in the dark areas look overly saturated and shifted. You want the contrast to stay but the color to return to its original look. What single change to the Curves layer do you make, and why does it work?
Show answer
Set the Curves layer's blend mode to Luminosity. The curve then changes only the lightness of each pixel, and hue and saturation come from the layers below, so the contrast remains while the color shift disappears.
Exercise
You want to brighten only the midtones of a photo while leaving the deep shadows and bright highlights as they are. Describe the points you add and which one you move.
Show answer
Add an anchor point in the shadows (for example at input 64) and another in the highlights (for example at input 192), and do not move them. Then add a third point at input 128 and drag it upward. The anchors keep the curve on the diagonal outside the midtone range.