Sub topic 14
Luminosity Masks for Highlights and Shadows
A luminosity mask is a layer mask built from the brightness of the image itself. Bright areas become white in the mask and dark areas become black, so an adjustment can target highlights, shadows, or midtones without a hand-drawn selection. This chapter assumes you can create a layer mask, load a selection, and add an adjustment layer. It also assumes you understand that white reveals, black conceals, and gray is partial.
Why brightness makes a good mask
Hand-painted masks work well when the area you want has a clear shape, such as a face or a sign. Many edits are about tone instead. You might want to darken a blown-out sky, lift only the deep shadows, or add contrast to the midtones. Tonal regions have soft, irregular borders that follow the picture's detail, and they are hard to paint by hand.
A luminosity mask solves this because the mask is derived from the pixels. Where the image is bright, the mask is mostly white. Where it is dark, the mask is mostly black. Because every brightness level maps to a gray level, the transition between affected and unaffected areas is smooth and follows the image's own edges.
Where the brightness data lives: channels
Photoshop stores the brightness of each color in the Channels panel (Window > Channels). An RGB image has a composite RGB channel plus Red, Green and Blue channels. Each channel is a grayscale image. In the composite, Ctrl-clicking (Windows) or Cmd-clicking (Mac) the RGB thumbnail loads a selection based on the overall brightness.
This is the core trick. A channel is already a grayscale picture. Loading it as a selection turns its gray values into selection strength. Bright pixels become strongly selected and dark pixels become weakly selected. When that selection is turned into a mask, you get a luminosity mask.
Building a basic highlights mask
Follow these steps on any photo with a bright sky or highlights.
- Open the image and choose Window > Channels.
- Hold Ctrl (Windows) or Cmd (Mac) and click the RGB channel thumbnail. The marching ants appear around areas brighter than about 50 percent. The selection is partial, so the ants only show the 50 percent boundary.
- Return to the Layers panel. With the selection still active, click the Create new fill or adjustment layer button and choose Curves.
- Photoshop adds the Curves layer with a mask created from the selection. The mask is brightest where the image is brightest.
- Drag the Curves down in the Properties panel to darken. Only the highlights change, and the shadows stay almost untouched.
Check the result by Alt-clicking (Windows) or Option-clicking (Mac) the mask thumbnail. You will see a grayscale image that looks like a high-contrast copy of your photo.
Building a shadows mask
A shadows mask is the inverse of the highlights mask. There are two ways to get it.
- Load the highlights selection, then choose Select > Inverse (Ctrl+Shift+I or Cmd+Shift+I) before creating the adjustment layer.
- Create the highlights mask first, then select the mask thumbnail and press Ctrl+I (Windows) or Cmd+I (Mac) to invert it.
Inverting turns white to black and black to white, so deep shadows become fully revealed and bright areas become hidden. Use the shadows mask with a Curves or Levels layer that lifts the dark tones to recover detail.
Building a midtones mask
Midtones sit between the other two. A midtones mask is white in the middle gray range and fades toward black at both ends. You build it by combining the highlights and shadows selections and removing them from a full selection.
- Make the highlights selection by Ctrl/Cmd-clicking the RGB thumbnail.
- Save it as a channel with the Save selection as channel button at the bottom of the Channels panel. Name it "Lights".
- Select the Lights channel and Ctrl/Cmd-click it to reload it, then invert with Select > Inverse and save as a new channel named "Darks".
- Load Lights, then hold Ctrl+Alt+Shift (Windows) or Cmd+Option+Shift (Mac) and click the Darks channel. This intersects the two selections.
- Save the result as a channel named "Mids". It is brightest where both Lights and Darks overlap, which is the middle range.
Doing this by hand is slow, which is why many photographers keep a set of saved channels with the image or use an action to generate them.
Making the mask tighter
The basic highlights mask is broad. Dark midtones still receive some of the adjustment. To restrict an edit to the brightest areas, make the mask more selective by multiplying it by itself.
- Load the Lights channel as a selection.
- Hold Ctrl+Alt+Shift (Windows) or Cmd+Option+Shift (Mac) and click the same Lights channel thumbnail again.
- Save the new selection as a channel named "Lights 2".
Each intersection with itself squares the gray values. A pixel at 80 percent becomes 64 percent, and a pixel at 50 percent becomes 25 percent. The mask keeps the brightest tones and drops everything else faster. Repeat for "Lights 3" and beyond if you need to be stricter. The same method on the Darks channel gives "Darks 2" and so on.
| Mask | Roughly affects | Typical use |
|---|---|---|
| Lights | Upper half of tones | Gentle highlight recovery |
| Lights 2 | Bright tones only | Tame a bright sky |
| Lights 3 | Near-white tones only | Specular highlights |
| Darks | Lower half of tones | Open up shadows |
| Darks 2 | Dark tones only | Deep shadow lift |
| Mids | Middle range | Contrast and color in midtones |
Applying a saved luminosity mask
Once your channels exist, applying one takes a few clicks.
- Ctrl/Cmd-click the channel, for example Lights 2.
- Click the RGB composite channel so the image displays normally.
- In the Layers panel, add an adjustment layer. The selection becomes its mask.
You can also click the Load channel as selection button at the bottom of the Channels panel. Both give the same result.
Refining a luminosity mask
A luminosity mask is a normal layer mask once it is created, so everything you know about masks still applies.
- Paint on it. Use a soft black brush to remove an area the brightness selection caught by mistake, such as a bright wall you want left alone.
- Adjust it with Curves. Select the mask and open Image > Adjustments > Curves or Levels to steepen the contrast. Making the mask more contrasty narrows the transition between affected and unaffected tones.
- Soften it. In the Properties panel, raise Feather to hide banding or halos along edges.
- Lower Density. This reduces the overall strength of the mask without repainting it.
Common problems
| Symptom | Likely cause | Fix |
|---|---|---|
| Halos around bright edges | Mask is too sharp or contrasty | Feather the mask slightly, or blur it with a small Gaussian Blur |
| Effect looks harsh or posterized | Mask range is too narrow for the adjustment | Use a broader mask such as Lights instead of Lights 3 |
| Adjustment hits the wrong areas | The selection was created from the wrong channel | Check you clicked RGB, not a single color channel |
| Color shifts in the result | A single color channel was used as the source | Use RGB for brightness, or switch the blend mode to Luminosity |
| Nothing appears to happen | The selection was empty or the mask is all black | Alt/Option-click the mask to inspect it |
Limits to keep in mind
Luminosity masks work on tone, not on subject. A bright cloud and a bright shirt are treated the same, so you may need a second painted mask to separate them. Highly compressed JPEG files can show banding when a narrow mask meets a strong adjustment, so editing in 16-bit mode gives smoother results. The channels you save are stored in the document, so they enlarge the file and remain only in formats that support channels, such as PSD and TIFF.
Finally, when you want a color effect to change only brightness, set the adjustment layer's blend mode to Luminosity. This keeps hue and saturation fixed and pairs well with Curves.
Exercise
You loaded the RGB channel as a selection and created a Curves layer. The sky darkens as intended, but bright midtones in the foreground also darken. Name two ways to restrict the edit to the brightest tones.
Show answer
First, build a narrower mask by loading the Lights channel and intersecting it with itself (Ctrl+Alt+Shift or Cmd+Option+Shift click), saving the result as "Lights 2", then using that to make the adjustment layer. Second, select the existing mask and apply Curves or Levels to the mask itself to increase its contrast, or paint the foreground area with black on the mask.
Exercise
A shadows luminosity mask is needed from an existing highlights mask on an adjustment layer. Which single action produces it, and what happens to the gray values?
Show answer
Select the mask thumbnail and press Ctrl+I (Windows) or Cmd+I (Mac) to invert it. Each gray value becomes its opposite, so white becomes black and black becomes white, and a 70 percent gray becomes 30 percent.