Excerpted from “Adobe Photoshop CS One-on-One” by Deke McClelland.
The true power of masking in Adobe® Photoshop® resides in its ability to use an image to select itself. This tutorial shows how to take a couple of color channels from an RGB photograph and combine them to produce a complex, naturalistic mask. And just for fun, we’ll be using this technique to select those wispiest of all image details, individual strands of hair.
1. OPEN A PHOTOGRAPH.
The photo I used is of a high school senior from the PhotoSpin image library.

2. SURVEY THE COLOR CHANNELS.
Go to the Channels palette and click on the individual channel names Red, Green, and Blue. This permits you to peruse the channels and decide which ones are the best candidates for building a mask. The three channels in my image appear slightly colorized below.

You’re looking for the two channels that represent the biggest extremes—that is, extreme contrast between shadows and highlights as well as extreme contrast between each other. In my case, the best candidates appear to be Red and Blue. The Red channel contains the most contrast; the Blue channel has the distinction of being most unlike Red.
3. RETURN TO THE RGB COMPOSITE VIEW.
Now that we’ve decided on our channels, click RGB in the Channels palette to make the full-color image active.
4. CHOOSE THE CALCULATIONS COMMAND.
Choose Image > Calculations to display the Calculations dialog box. This command lets you mix two channels to form a new alpha channel using a blend mode and an Opacity value.
Tip: Turn on the Preview check box, if it’s not turned on already. With Preview on, you can observe the results of your changes in the full-image window.
5. SELECT THE DESIRED SOURCE CHANNELS.
You can think of the Calculations dialog box as layering one channel on top of another. Source 2 is the background channel; Source 1 is the channel in front. This means Source 1 is in a position of emphasis and should therefore contain the channel with the highest contrast. Accordingly:
- Make sure the Source 1 and Source 2 pop-up menus are set to the image you want to mask.
- This is a single-layer document, so both Layer options are automatically Background. No need to change them.
- Set the first Channel option to the channel with the most contrast (in my case, Red). Set the second one to the channel most unlike the first (in my case, Blue).
6. EXPERIMENT WITH INVERT AND BLENDING.
This is the least predictable step in the process because the ideal settings vary radically depending on the composition of your image. Bear in mind, the goal is to select the foreground subject by making it white against a deselected black background. So more than likely, you’ll need to invert the luminosity values in at least one of the channels and maybe both. Blend modes that inherently invert the image, such as Difference and Subtract, are also useful.

The image above shows a few of my experiments (with slight colorization, to better convey gray values):
- In the first image, I turned on the Invert check box for both channels and set the Blending option to Multiply. This generates a light foreground and a dark background, but I’d like to increase the contrast.
- Next, I turned off Invert for the Blue channel and set the Blending option to Difference. This delivers nice black edges, but the highlights remain too dark.
- Finally, I turned off Invert for the Red channel and turned it on for Blue. Then I set Blending to Subtract. This particular blend mode subtracts the luminosity values in the Red channel from those in the inverted Blue channel. It also comes with an Offset value that, when positive, adds brightness across the image. I raised the value to 50, which elevates the luminosity and helps prevent some of the rampant clipping inherent with Subtract.
Incidentally, none of these variations is particularly flattering, and it’s only going to get more gruesome as the exercise progresses. Masks are not pretty things; don’t share them with your clients.
7. ASSIGN THE IDEAL SETTINGS.
In this case, my last experiment comes the closest to a finished mask. My final settings were as follows:
- Turn off the first Invert check box, turn the second one on.
- Change Blending to Subtract.
- Set the three numerical values to 100 percent, 50, and 1 respectively, as shown on the right.
- The Result setting should be New Channel. This tells Photoshop to add an alpha channel to hold your mask.
When you’re done making your own settings, click OK.
8. NAME THE NEW ALPHA CHANNEL.
Double-click the Alpha item in the Channels palette. I like to name my channels after how I created them, so I called mine “R, B Inv, Subtract, Offset 50”, but you can call yours whatever you want.
9. DUPLICATE THE NEW CHANNEL.
Click the last channel in the list and drag it onto the tiny page icon at the bottom of the Channels palette. This duplicates the channel. Double-click the new channel and rename it “First Levels Adjustment.”
Why duplicate the channel? To protect yourself. When working in a single channel, you don’t have access to layers. This means you can’t experiment with different options and merge them together. So the best way to give yourself space to backtrack and make different choices is to duplicate the alpha channel between steps. Then you always have your incremental channels to come back to. An image can contain 56 channels, so you’ve got lots of room to work.
10. INCREASE THE CONTRAST OF THE HAIR.
Choose Image > Adjustments > Levels. Adjust settings to better define the mask. In my case, to heighten the contrast between the woman’s hair and the background, I increased the first value to 80 and reduced the third value to 190.
As shown below, this does a great job of increasing the contrast between the hair and the background. But the transitions between the shoulders and background are weak, ultimately fading into a wishy-washy gray at the bottom of the image.

The obvious question is, why not find a better combination of Levels values? Because there isn’t one. We can accommodate either the hair or the shoulders, but not both. Unless, that is, we call in another channel.
11. AGAIN, DUPLICATE THE FOURTH CHANNEL.
Go back to the channel you created in Steps 4 through 8 (the one I called R, B Inv, Subtract, Offset 50) and drag it onto the icon at the bottom of the Channels palette. Again, Photoshop duplicates the channel. Rename it “Second Levels Adjustment.”
12. INCREASE THE CONTRAST OF THE SHOULDERS.
Press Ctrl+L (Command+L) to display the Levels dialog box. Adjust settings again to better define any weak areas of contrast. In my case, I changed the first value to 170 and the third to 190. This leaves just 20 luminosity values to express the grays, not nearly enough variations to maintain the subtle transitions between strands of hair. But it works well for the area below the shoulders.

13. CREATE THE GRADIENT CHANNEL.
To create the final mask, you need to blend the two channels you’ve created (First Levels Adjustment and Second Levels Adjustment). The best way to do this is to create a new alpha channel with a gradient that marks the point where the two Levels Adjustment channels diverge.
Tip: Use a ruler guide to mark the point at which you want to join your two Levels Adjustment channels. When you create the Gradient channel, you’ll want to line your gradient up with this transition area.
The Gradient channel I created is shown above. To create this gradient, I set the Gradient tool to Color Burn mode and 100% opacity. The black area indicates where the First channel is good; the white area is best expressed in the Second channel. We can blend the two channels using Calculations.
14. CHOOSE THE CALCULATIONS COMMAND.
Choose Image > Calculations to display the Calculations dialog box. Then set the options as follows:
- Set the Channel option for Source 1 to Second Levels Adjustment.
- Set the Channel option for Source 2 to First Levels Adjustment.
- Turn off both Invert check boxes.
- Set Blending to Normal.
- Turn on the Mask check box and then change the final Channel setting to Gradient.
Click the OK button to create the new alpha channel.

15. NAME THE NEW ALPHA CHANNEL.
Double-click the newest Alpha item in the Channels palette to highlight the channel’s name. Then call it “Gradient Mask Combo” to indicate that alpha channels were combined using a gradient mask.
Now all that’s left is to clean up the alpha channel by painting inside the image window. But instead of using the brush tool, we’ll be lightening and darkening pixels with the dodge tool.
16. SELECT THE DODGE TOOL IN THE TOOLBOX.
For convenience’s sake, we’ll use this one tool to do both the dodging and burning.
17. CHANGE THE RANGE SETTING IN THE OPTIONS BAR TO HIGHLIGHTS.
You can do this from the keyboard by pressing Shift+Alt+H (Shift+Option+H on the Mac). This restricts the dodging to only the lightest colors in the mask. Also, increase the Exposure to 50 percent and enlarge the brush diameter to somewhere between 150 and 200 pixels. For the smoothest results, keep the brush soft (Hardness: 0 percent).
18. DRAG OVER THE AREAS THAT SHOULD BE WHITE.
The white areas represent your mask. Chances are, there are some things you want included in the mask that are currently gray. You can paint over these areas with Dodge tool to lighten them and make them part of the masked area.
I used the Dodge tool to paint over the light grays in the shoulders and the outer edge of the hair. (Don’t worry about the central stuff such as the face; we’ll delete that wholesale in a moment.)
Drag as many times as you need to, but be careful not to lighten too much. Used in excess, the dodge tool can expand the selection too far from the natural edges of the hair.
19. CHANGE THE RANGE TO SHADOWS.
You can do this by pressing Shift+Alt+S (or Shift+Option+S). This will restrict the changes to the darkest colors.
20. ALT-DRAG OVER THE AREAS THAT SHOULD BE BLACK.
(If you’re working on a Mac, press the Option key and drag.) Pressing Alt or Option when dragging with the Dodge tool burns the image. This permits us to continue to use the same brush size and Exposure settings that we established in previous steps.
As ever, beware of overdoing it. Overdarkening can choke the selection and result in transitions that are too sharp. You can rarely go wrong by leaving too many gray pixels, especially around the edges of hairs.
21. LASSO THE CENTRAL PORTION OF THE IMAGE.
Now to round up all that extraneous junk in the center of the image. Press the L key to get the lasso tool. Then drag around the interior details.

22. FILL THE SELECTION WITH WHITE.
Press D for the default colors, which are foreground white and background black when working in a mask. Then press Alt+Backspace (Option+Delete on the Mac) to clear the middle of the mask. As shown below, I made the face, neck, dress, and straps go away.

23. SAVE YOUR ALPHA CHANNELS.
Choose File > Save to save the changes made to your image, including all of your new alpha channels.


































