Magic Wand

The Magic Wand, which you can activate by pressing the W key, selects all pixels that are similar in hue and value to the pixel you first clicked on. Originally, the Magic Wand would select only the pixels that touched each other (were contiguous), but now this capability is an option (albeit, the default). If you turn off the contiguous parameter in the Option bar, the Magic Wand will select all the pixels in an image that are similar in hue and value to the first pixel.

You tell the wand how choosy to be by setting its tolerance, from 0 to 255. Based on the tolerance set, the wand extends the selection outward until it finds no more pixels with the color values within the limits you've specified. For example, if the tolerance was set to 40 and you clicked with the wand on a pixel that had a value of 100, the Magic Wand would select all pixels with values between 60 and 140. (Both hue and luminance are figured into a special equation as the wand decides which pixels it can and cannot select.) A high tolerance will select a wider range of pixels. A low tolerance will select a very narrow range of pixels.

If you want to select a wide range of a color, from bright to dark, set the tolerance higher than the default (32) and click the wand in the middle of the range of color values. If you click in an area of the color that is very dark or very light, you are giving the wand less latitude. (Remember, color values can range from 0 to 255.)

The Magic Wand's selections can be smoothed (anti-aliased) or rough, depending on whether you've marked the Anti-alias box in the Option bar, and you can also check the Use All Layers box, in which case the Magic Wand will select pixels based on color information in all the layers of your image, rather than simply from the active layer. For Figure 5.9 I took a simple close-up photo (made with a lowly 2-megapixel camera, by the way), and set the Tolerance first at 12 (at top) and then at 32 (bottom), clicking with the Magic Wand in the brightest part of the orange in both cases.