Written By Steve Patterson

The Magic Wand Tool, known simply as the Magic Wand, is one of the oldest selection tools in Photoshop. Unlike other selection tools that select pixels in an image based on shapes or by detecting object edges, the Magic Wand selects pixels based on tone and color. Many people tend to get frustrated with the Magic Wand (giving it the unfortunate nickname “tragic wand”) because it can sometimes seem like it’s impossible to control which pixels the tool selects. In this tutorial, we’re going to look beyond the magic, discover how the wand really works, and learn to recognize the situations that this ancient but still extremely useful selection tool was designed for.

Want an easier way to follow along with our tutorials? Download them as printable PDFs!

Selecting The Magic Wand

If you’re using Photoshop CS2 or earlier, you can select the Magic Wand simply by clicking on its icon in the Tools palette. In Photoshop CS3, Adobe introduced the Quick Selection Tool and nested it in with the Magic Wand, so if you’re using CS3 or later (I’m using Photoshop CS5 here), you’ll need to click on the Quick Selection Tool in the Tools panel and keep your mouse button held down for a second or two until a fly-out menu appears. Select the Magic Wand from the menu:

The Magic Wand Tool in Photoshop. Image © 2010 Photoshop Essentials.com

The Magic Wand is nested behind the Quick Selection Tool in Photoshop CS3 and later.

The “Magic” Behind The Wand

Before we look at a real world example of the Magic Wand in action, let’s see how the tool works and how there’s really nothing magical about it. Here’s a simple image I’ve created showing a black to white gradient separated by a solid red horizontal bar through its center:

A black to white gradient separated by a red horizontal bar. Image © 2010 Photoshop Essentials.com

A simple gradient divided by a red bar, but you knew that already.

As I mentioned, Photoshop’s Magic Wand selects pixels based on tone and color. When we click on an area in the image with the tool, Photoshop looks at the tone and color of the area we clicked on and selects pixels that share the same color and brightness values. This makes the Magic Wand exceptional at selecting large areas of solid color.

For example, let’s say I want to select the horizontal red bar. All I need to do is click anywhere on the red bar with the Magic Wand. Photoshop will see that I’ve clicked on an area of red and will instantly select every pixel in the image that shares that same shade of red, effectively selecting the red bar for me just by clicking on it:

The Magic Wand Tool easily selected=

One click with the Magic Wand is all it took to select the entire red bar.

Tolerance

Selecting the solid colored red bar was easy enough, since there were no other pixels in the image that shared the same shade of red, but let’s see what happens if I click with the Magic Wand on one of the gradients. I’ll click on an area of middle gray in the center of the gradient above the red bar:

Clicking on middle gray with the Magic Wand Tool in Photoshop. Image © 2010 Photoshop Essentials.com

The selected area after clicking in the middle of the upper gradient.

This time, Photoshop selected an entire range of brightness values rather than limiting itself to pixels that were exactly the same tone and color as the middle gray area I clicked on. Why is that? To find the answer, we need to look up in the Options Bar along the top of the screen. More specifically, we need to look at the Tolerance value:

The Magic Wand Tolerance option in the Options Bar in Photoshop. Image © 2010 Photoshop Essentials.com

The Magic Wand’s Tolerance option.

The Tolerance option tells Photoshop how different in tone and color a pixel can be from the area we clicked on for it to be included in the selection. By default, the Tolerance value is set to 32, which means that Photoshop will select any pixels that are the same color as the area we clicked on, plus any pixels that are up to 32 shades darker or 32 shades brighter. In the case of my gradient, which contains a total of 256 brightness levels between (and including) pure black and pure white, Photoshop selected the entire range of pixels that fell between 32 shades darker and 32 shades brighter than the shade of gray I initially clicked on.

Let’s see what happens if I increase the Tolerance value and try again. I’ll increase it to 64:

Increasing the Magic Wand Tolerance value in Photoshop. Image © 2010 Photoshop Essentials.com

Doubling the Tolerance value from 32 to 64.

With Tolerance now set twice as high as it was originally, if I click with the Magic Wand on the exact same center spot in the gradient, Photoshop should now select an area twice as large as it did last time, since it will include all the pixels that are between 64 shades darker and 64 shades lighter than the initial shade of gray I click on. Sure enough, that’s what we get:

The Magic Wand selection with Tolerance set to 64. Image © 2010 Photoshop Essentials.com

This time, with a Tolerance setting twice as high, the selected area of the gradient is twice as large.

What if I want to select just the specific shade of gray I click on in the gradient and nothing else? In that case, I’d set my Tolerance value to 0, which tells Photoshop not to include any pixels in the selection except those that are an exact match in color and tone to the area I click on:

Increasing the Magic Wand Tolerance value in Photoshop. Image © 2010 Photoshop Essentials.com

Setting the Tolerance value to 0.

With Tolerance set to 0, I’ll click again on the same spot in the center of the gradient, and this time, we get a very narrow selection outline. Every pixel that’s not an exact match to the specific shade of gray I clicked on is ignored:

The selection created with the Magic Wand with Tolerance set to 0. Image © 2010 Photoshop Essentials.com

Increasing or decreasing the Tolerance value has a big impact on which pixels in the image are selected with the Magic Wand.

You can set the Tolerance option to any value between 0 and 255. The higher the value, the wider the range of pixels that Photoshop will select. A Tolerance setting of 255 will effectively select the entire image, so you’ll usually want to try a lower value.

Contiguous

As we were exploring the effect the Tolerance setting has on Magic Wand selections, you may have noticed something strange. Each time I clicked on the gradient above the red bar, Photoshop selected a certain range of pixels but only in the gradient I was clicking on. The gradient below the red bar, which is identical to the gradient I was clicking on, was completely ignored, even though it obviously contained shades of gray that should have been included in the selection. Why were the pixels in the lower gradient not included?

The reason has to do with another important option in the Options Bar – Contiguous. With Contiguous selected, as it is by default, Photoshop will only select pixels that fall within the acceptable tone and color range determined by the Tolerance option and are side by side each other in the same area you clicked on. Any pixels that are within the acceptable Tolerance range but are separated from the area you clicked on by pixels that fall outside the Tolerance range will not be included in the selection.

In the case of my gradients, the pixels in the bottom gradient that should otherwise have been included in the selection were ignored because they were cut off from the area I clicked on by the pixels in the red bar which were not within the Tolerance range. Let’s see what happens when I uncheck the Contiguous option. I’ll also reset my Tolerance setting to its default value of 32:

The Contiguous option for the Magic Wand in Photoshop. Image © 2010 Photoshop Essentials.com

Contiguous is selected by default. Click inside the checkbox to deselect it if needed.

I’ll click again in the center of the upper gradient with the Magic Wand, and this time, with Contiguous unchecked, the pixels in the bottom gradient that fall within the Tolerance range are also selected, even though they’re still separated from the area I clicked on by the red bar:

A Magic Wand selection with the Contiguous option deselected. Image © 2010 Photoshop Essentials.com

With Contiguous unchecked, any pixels anywhere in the image that fall within the Tolerance range will be selected.

Up next, we’ll look at some additional options for the Magic Wand and a real world example of it in action as we use it to quickly select and replace the sky in a photo!

Leave a Reply