Adding To The Selection
Besides changing the Fuzziness value, we can also use the Add to Sample Tool to add areas to our initial selection. As we've already learned, though, there's no need to waste time selecting the eyedropper tools from the dialog box. All we need to do to temporarily switch from the main Eyedropper Tool to the Add to Sample Tool is to press and hold the Shiftkey. With the Shift key held down, a small plus sign ( + ) will appear in the bottom right corner of the eyedropper cursor, letting you know that you've switched tools. Releasing the Shift key will switch you back to the main Eyedropper Tool (the plus sign will disappear).
I'm going to set my Fuzziness value back to 40, just to make things easier to see:
Setting Fuzziness back to 40.
To add more of the gradient to my initial selection, I'll hold down my Shift key, which switches me to the Add to Sample Tool, and I'll simply click on the area I want to add. I'll choose a brighter shade of blue:
Clicking on the image with the Add to Sample Tool (holding down the Shift key).
If we look at the preview window, we see that lighter shades of blue have been added to my selection:
More of the gradient has been selected.
You can also drag across an area of the image with the Add to Sample Tool to add an entire range of colors or brightness values to the selection at once. Again, I'll hold down my Shift key to access the Add to Sample Tool, then I'll click and drag across a large area of the gradient:
Dragging with the Add to Sample Tool.
And now we see in the preview window that I've added even more of the gradient to my selection:
The result after dragging with the Add to Sample Tool.
Subtracting From The Selection
We can also subtract areas from the selection using the Subtract from Sample Tool. Again, there's no need to grab it from the dialog box. Simply hold down your Alt (Win) / Option (Mac) key on your keyboard to temporarily switch to the Subtract from Sample Tool. A small minus sign ( - ) will appear in the bottom right corner of your eyedropper icon. Click on the area you want to remove from the selection, then release the Alt (Win) / Option (Mac) key to switch back to the main Eyedropper Tool when you're done.
I'll click on a darker area of the gradient with the Subtract from Sample Tool:
Clicking with the Subtract from Sample Tool.
The preview window now shows that I've removed those darker shades of blue from the selection:
The result after clicking with the Subtract from Sample Tool.
One problem, though, with the Subtract from Sample Tool is that it doesn't work as well as the Add to Sample Tool, and it's not always easy to predict what results you'll get from it. If you make a mistake with the Add to Sample Tool and add the wrong area to your selection, it's often easier just to undo your last step and try again. The Color Range command gives us a single Undo level, so if you make a mistake with the Add to Sample Tool, press Ctrl+Z (Win) / Command+Z(Mac) on your keyboard to undo it, then try again.
When you're happy with your selection preview, click OK in the top right corner of the Color Range dialog box to close out of it:
Clicking OK to close out of the dialog box.
Photoshop then displays your selection in the document as a standard "marching ants" selection outline. Keep in mind, though, that in most cases, the Color Range command will have partially selected certain pixels, and that Photoshop can only display the selection outline around pixels that are at least 50% selected. Any pixels that are less than 50% selected will fall outside the selection outline, which means that the outline may not be a completely accurate representation of your selection. This isn't a huge problem, just something to remember:
The standard "marching ants" outline is now displayed around the selected part of the gradient.
Let's take a quick look at a real world example, which will also give us a chance to look at the remaining options in the Color Range dialog box. In this image, I'd like to select just the red roses in the bouquet so I can leave them in color while converting the rest of the image to black and white:
The roses need to be selected.
With the Color Range dialog box open and my main Eyedropper Tool active, I'll click once inside one of the roses to make my initial color selection:
Clicking once to select an initial shade of red.
We can see my initial selection in the preview window:
The initial selection appears in the preview window.
To add more areas to my selection, I'll press and hold my Shift key, which temporary switches me to the Add to Sample Tool, and I'll click on more shades of red in the roses. I can also drag across an area, just as we saw with the gradient, to add multiple shades of red to my selection at once:
Holding Shift and clicking to select more shades of red.
The preview window shows the areas that have been added to the selection:
The newly added sections appear in the preview.
The Preview Options
One option we have with the preview window that we haven't looked at yet is the ability to view the actual image itself inside the preview window, rather than seeing a grayscale preview of the selection. If you look directly below the preview window, you'll see two options - Selection and Image. To switch to the image view, select the Image option. You can even click on the image inside the preview window, rather than in the the document window, to make and edit your selections. You may not find this option particularly useful, but it's there if you need it. To switch back to viewing the grayscale preview, choose the Selection option (which is selected by default):
Choose "Image" to view your image in the preview window. Choose "Selection" to view the grayscale preview.
A much more useful preview option is found at the very bottom of the Color Range dialog box. The Selection Previewoption controls what we see in our document window. By default, it's set to None, which means we're seeing our actual image in the document window:
The Selection Preview option.
If you click on the word None, you'll open a list of additional choices - Grayscale, Black Matte, White Matte, and Quick Mask - each of which gives us a different way to preview our current selection inside the document window. I'll choose the first one, Grayscale:
Choosing Grayscale from the Selection Preview option.
And now if we look in my document window, rather than seeing the image, we're seeing a full size grayscale preview of my current selection. It's the same preview that was displayed in the preview window, but it's much more useful when viewed at full size:
A full size version of the grayscale selection preview now appears in the document window.
Another very helpful way to preview your selection is by choosing Black Matte from the Selection Preview option:
Choosing Black Matte from the Selection Preview option.
This is my favorite way to preview my selection because it displays the actual image itself, or at least, the areas of the image that are currently inside my selection, against a solid black background:
The selected areas of the image are now displayed against a black background in the document window.
You can also choose White Matte, which will display the selected area(s) of the image against a solid white background, or Quick Mask to view the selection with the Quick Mask red overlay. All four options can be useful ways to preview your selection in the document window. To switch back to viewing the image, set the Selection Preview option back to None.
Localized Color Clusters (Photoshop CS4 and Higher)
Notice, though, that I'm running into a bit of a problem. I want to select only the red roses in the photo so I can keep them in color while converting the rest of the image to black and white, but if you look at the very top of the document in the previous screenshot, you'll see that I've also selected the top part of the woman's dress because it's the same red color as the roses.
In Photoshop CS4, Adobe added a new feature to the Color Range command called Localized Color Clusters. We can use this option to limit the areas in the photo where Photoshop will look for matching colors. I'll click inside the checkbox to enable the option (again, the Localized Color Clusters option is only available in CS4 and higher):
Turning on Localized Color Clusters.
As soon as we turn on Localized Color Clusters, another option, Range, becomes available directly below the Fuzziness slider. With Range set to 100% (or with the Localized Color Clusters option turned off), Photoshop will look throughout the entire image for areas of matching color to add to our selection. But as we lower the Range value by dragging the slider towards the left, we tell Photoshop to look only at areas of the photo that are closer to the areas we clicked on, and to ignore areas that are too far away from where we clicked.
In other words, I can tell Photoshop to ignore the red part of the woman's dress at the top of the photo, and to focus only on areas closer to the roses (the areas I clicked on to sample colors) just by lowering my Range value. I'll lower my Range value down to around 50% or so. And now. if we look at the top of the preview window, we see that it has become solid black, which means the woman's dress is no longer part of the selection because it's too far away from the roses:
Lowering the Range value removed the top area of the photo from the selection.
I'll continue clicking inside the roses with my Add to Sample Tool to add more areas to my selection. Then I'll fine-tune my selection with my Fuzziness slider. With the gradient example we looked at previously, we saw how to add to the selection by increasing the Fuzziness value, but with this image, I'm actually going to tighten up the selection a bit by lowering my Fuzziness value slightly. Finally, I'll re-adjust my Range value to tighten the selection even further, and after playing around with the settings for a few minutes (you'll often need to go back and forth with the settings to get things just right), I'm happy with my final result:
My final Color Range settings.
Inverting The Selection
One last important thing I need to consider is that I currently have the roses selected, but what I actually need is for everything except the roses to be selected. In other words, I need to invert my selection so that everything that's currently selected (the roses) becomes deselected, and everything that's currently not selected (the rest of the photo) becomes selected.
To invert the selection from within the Color Range dialog box, all we need to do is select the Invert option below the eyedroppers. This will also invert the grayscale selection preview in the preview window, since my roses (now filled with black) are no longer part of my selection, while the rest of the image (filled with white) is now selected:
Selecting the Invert option.
To complete my selection, I'll click OK in the top right corner of the dialog box to close out of the Color Range command, and we now see the standard "marching ants" selection outlines in my document. As I mentioned earlier, the selection outline only appears around pixels that are at least 50% selected, which means what we're seeing is often not entirely accurate:
The standard selection outline appears in the document.
To quickly finish up my effect, I'll click on the New Adjustment Layer icon at the bottom of the Layers panel:
Clicking on the New Adjustment Layer icon.
Then I'll choose a Black & White adjustment layer from the list that appears:
Choosing a Black & White adjustment layer.
This adds a Black & White adjustment layer above my image on the Background layer. We can see in the layer mask preview thumbnail that Photoshop applied the selection I created with the Color Range command to the adjustment layer's mask:
The newly added Black & White adjustment layer.
I'll leave the Black & White adjustment layer set to its default settings for now, just so we can see that thanks to the Color Range command's ability to select the roses based on their color, I was able to easily isolate them from the rest of the image so they can remain in color while everything else is converted to black and white:
The final result.
And there we have it! That's how to select areas of similar color in an image using Photoshop's Color Range command! It can take some practice at first, but once you're more comfortable with it, you'll find that when it comes to making color-based selections in Photoshop, even though the Magic Wand is easier to use, the Color Range command will give you better results every time.
No comments:
Post a Comment