Sub topic 6
Smooth blends with gradients
This chapter assumes you can navigate the Layers, Tools, and Properties panels, and that you can add a layer mask and paint on it with the Brush tool. You should also know the rule from earlier chapters: white on a mask reveals the layer, black conceals it, and gray shows it partially.
A brush can only make a soft edge as wide as its feathered tip. A gradient is a smooth, continuous change from one color to another. On a mask it gives you a long, even transition from hidden to visible. That makes it the standard tool for blending two photos, fading a texture into a background, or darkening one side of a frame.
Why gradients suit masks
A mask is a grayscale image. A gradient from black to white fills it with every gray level between those two values. Each pixel's gray value sets how much of the layer shows at that point. A gradient therefore gives you a gradual fade in one drag, with no visible brush strokes and no banding from overlapping dabs.
Typical uses:
- Blending a sky replacement into a landscape so the horizon has no hard line.
- Fading a layer out toward one edge, such as a vignette or a double-exposure effect.
- Limiting an adjustment layer (for example, a darkening Curves layer) to the top of the frame.
- Joining two exposures of the same scene.
Setting up a gradient on a mask
Follow these steps on any layer that already has a mask.
- In the Layers panel, click the mask thumbnail. A thin border appears around it. If you skip this step, the gradient is painted onto the layer's pixels, not the mask.
- Press D to reset the foreground and background colors to black and white. On a mask, Photoshop uses the default grayscale pair.
- Select the Gradient tool (shortcut G).
- In the Options bar, open the gradient picker and choose Foreground to Background or Black, White.
- Choose the Linear gradient style (the first of the five style buttons).
- Set Mode to Normal and Opacity to 100%. Leave Reverse unchecked until you need it. Keep Dither checked, which reduces visible banding in the transition.
- Click and drag across the area where you want the blend to happen.
The drag defines the transition:
- The start point (where you press) takes the foreground color. Everything behind it is solid foreground.
- The end point (where you release) takes the background color. Everything beyond it is solid background.
- The area between the two points contains the gradient.
With white as the foreground, the start of your drag is fully visible and the end is fully hidden. Press X to swap the colors and flip the result.
Controlling the length of the transition
The distance you drag controls how gradual the blend is.
| Drag length | Resulting blend |
|---|---|
| Short | Narrow transition, close to a hard edge |
| Medium | Natural-looking fade for most photo blends |
| Long | Very gradual fade, often across most of the frame |
Hold Shift while dragging to constrain the angle to multiples of 45 degrees. This keeps a horizontal fade perfectly horizontal, which matters when you are matching a straight horizon.
You can drag again as many times as you like. Each new gradient replaces the pixels in the mask. If you want to keep part of what you already painted, change the gradient's Mode or use a selection to limit where the gradient applies, as described below.
Worked example: blending a replacement sky
Suppose you have a landscape photo on the Background layer and a sky photo placed above it as a second layer.
- Select the sky layer and click Add Layer Mask at the bottom of the Layers panel. The mask is white, so the sky covers the whole frame.
- Click the mask thumbnail to target it.
- Press D, then press X so the foreground is black and the background is white. Because black conceals, the area where the drag starts will hide the sky layer.
- Choose the Gradient tool with a Linear gradient.
- Start the drag in the lower part of the image, near the landscape, and release at the horizon line.
Below the start point the sky layer is hidden, so the landscape shows. Above the end point the sky layer is fully visible. The horizon region is gray, so both layers mix there.
- If the blend sits too high or low, drag again with a different start or end point. Each attempt overwrites the previous gradient, so you do not need to undo.
- Fine-tune with a soft black or white brush wherever trees, buildings, or mountains cross the horizon and need cleaner edges.
If the transition looks washed out or too wide, shorten the drag. If it is still too sharp, lengthen it or soften the result with the Feather slider in the Properties panel, covered in a later chapter.
Other gradient styles on masks
Linear is the most common choice, but the other styles fit particular jobs.
- Radial gradients fade outward from a center point. Use one to build a spotlight or a vignette. With a black outer color, the layer fades away toward the edges.
- Reflected gradients mirror the ramp on both sides of the start point. They suit a horizontal band of visibility, for instance a fog layer that is strongest in the middle of the frame.
- Angle and Diamond styles are rarely useful on masks, but they can produce unusual shaped fades for graphic work.
For a radial vignette, set the Gradient to Foreground to Background with white inside and black outside, choose Radial, and drag from the center of the subject to a corner.
Combining gradients with painting and selections
Gradients rarely finish a mask on their own. A common routine is to lay down a broad gradient first, then correct it with a brush.
Two techniques protect existing work:
- Selections limit the gradient. Make a selection, then drag the gradient. Only the selected area of the mask changes. This is useful when you want a fade across the sky but want to leave a foreground tree untouched.
- Duplicate the mask first. Drag the mask thumbnail onto the New Layer button in a different layer? That does not copy it. Instead, hold Alt (Windows) or Option (Mac) and drag the mask thumbnail to another layer to copy it. Copying gives you a backup to compare against.
A third approach uses the gradient's mode. Setting the Gradient tool's Mode to Multiply darkens the existing mask values instead of replacing them. Multiplying gray by another gray only moves the mask toward black, so you can add a fade without erasing painted white areas. Screen works the other way and pushes the mask toward white.
Editing a gradient after the fact
A gradient on a regular mask is baked into the mask's pixels. There is no handle to adjust later. You have three practical ways to change it:
- Drag a new gradient over the old one.
- Use Image > Adjustments > Levels or Curves (Ctrl/Cmd + L or M) on the targeted mask to shift or tighten the transition. Moving the black and white input sliders closer together makes the blend sharper.
- Use Gradient Map or an adjustment layer clipped to a group if you need the effect to stay fully editable.
For gradients you want to keep adjustable, apply them in a Gradient Fill layer (Layer > New Fill Layer > Gradient). It keeps the angle, scale, and colors editable, and it can carry its own layer mask.
Common problems
- The gradient colors your image instead of the mask. The layer thumbnail was targeted. Click the mask thumbnail, then undo and redo the drag.
- The gradient comes out in color. The mask is grayscale, so a colored gradient is converted to gray, but the tonal result is not what you expect. Press D to reset to black and white.
- The fade runs the wrong way. Press X to swap colors, or tick Reverse in the Options bar.
- Visible banding in the blend. Make sure Dither is on. In 8-bit files, long fades can still band, and working in 16-bit mode reduces it.
- The blend has a halo along edges. A gradient does not know where objects are. Combine it with a selection or a hand-painted correction at the boundary.
Summary of the workflow
A reliable order for most gradient masks is: target the mask, reset to black and white, pick Linear, drag to set the main fade, then refine with brushes. Hold Shift for straight angles, and redo the drag until the transition sits where you want it.
Exercise
You added a mask to a sky layer, and the sky should be visible at the top of the image and fade out to nothing at the horizon. With white as the foreground and black as the background, in which direction do you drag the Linear gradient, and what do you press if the result is reversed?
Show answer
Drag from the top of the image (start point, white, so the sky is fully visible) down to the horizon (end point, black, so the sky is hidden). If the fade runs the wrong way, press X to swap the foreground and background colors, or enable Reverse in the Options bar, then drag again.
Exercise
You drag a gradient on a layer, but the photo itself turns black and white instead of fading. What went wrong, and how do you fix it?
Show answer
The layer thumbnail was targeted instead of the mask thumbnail, so the gradient was painted into the layer's pixels. Undo, click the mask thumbnail so its border appears, and drag the gradient again.