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.
The photo I used is of a high school senior from the PhotoSpin image library.

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.
Now that we’ve decided on our channels, click RGB in the Channels palette to make the full-color image active.
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.
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).
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.
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.
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.
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.
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.
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.”
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.

In 1985, Deke McClelland oversaw the implementation of the first personal computer-based production department in Boulder, Colorado. In 1986, he became the artistic director for Publishing Resources, one of the earliest all-PostScript service bureaus in the United States. Deke McClelland is a well-known expert and lecturer on Adobe Photoshop, Illustrator, InDesign, and the broader realm of computer graphics and design. To date, he has written 85 books that have been translated into 24 languages, with more than 4 million copies in print.