Selection tools: Part III, the Magic Wand

Compared to many other types of software, graphics programs have some of the simplest or most descriptive terms to describe various functions. It is not hard to guess the purpose of the Crop or Text tools. You may not immediately understand the roles of the Magic Wand, but after seeing what it can do, it’s not hard to see why it has this name.

The Magic Wand bases its selections primarily on colour. The advantage of this technique is that it can find natural edges in a flash, so there is less need for painful edge-tracing.

The process behind the Magic Wand is simple. When you click on part of your image, anything nearby that is a similar colour will also be selected (where you initially click is known as the ‘sampled area’ or ‘sampled pixel’). For example, click part of a blue sky with the Magic Wand and you’ll find that the most of the sky will be selected.


The Magic Wand’s tolerance value will determine how similar a colour has to be to the sampled pixel in order to be included in the selection. Set a value of zero and only that precise colour will be selected; conversely, if the tolerance is set too high, it may start to include unwanted parts of the image, particularly at borders. Trying different values will help select the maximum desired area, but don’t get obsessed with trying to catch everything in one click. As discussed later in this column, there are ways to fine-tune selections.

Contiguous selection

Depending on your program, there may-be an option for a ‘contiguous’ selection. This means that in order to be included with the selection, pixels must be touching other pixels than fall within the tolerance range — and connect to the sampling point. For example, if you have a blue sky that it is cut down the middle by a white cloud, then using the Magic Wand setting on the left side will select only the left section of sky (with the contiguous setting turned on). This is because there is no connecting blue area between both halves. If there was just a small sliver of blue connecting both halves, then the entire blue sky would be highlighted.

If you turn off the contiguous option, everything in the picture that falls with the tolerance value will be highlighted. If someone is wearing a blue shirt and you sample the sky without the contiguous setting, the shirt will also be selected (assuming it falls with the same tolerance range). Both techniques have their uses, but the non-contiguous option features more in colour management and high-end techniques. It can also be used to remove purple fringing (purple artefacts introduced by digital cameras). By default, most Magic Wands are set to contiguous.

Tricks to use

One overlooked but exceptionally useful aspect of any selection tool is inversion. In other words, you exchange the selected sections with those that were not selected. Most programs have this feature listed under the Selection menu or similar (such as Select-Inverse or Selection-Invert). The reason this option is so powerful is that frequently it is easier to highlight everything you do not want and then use the invert option to highlight the desired object.

Consider the picture of the polar bear shown here. It was far easier to select the water (which is mainly blue) than to select the bear, which is black, yellow, white and other colours. Even using this technique, the Magic Wand does not make a perfect selection on the first attempt. A small part of the left side of the bear’s head ended up in the wrong selection zone, and smaller dots in the water were not included, see here. There are many solutions to these problems, but one of the easiest is to use the Freehand lasso tool.See understanding selection tools part one. In programs such as Paint Shop Pro and Photoshop, if you hold down the <Shift> key while using any selection tool, the new area you highlight will be added to the overall selected area. Likewise, <Alt> will subtract the new area. In the bear image, most of the hard work had been done with the Magic Wand, so the Freehand lasso was used in a flash to tidy up the stragglers. The ‘add’ option was used for the small dots in the water and the subtract option for the small area on left hand side of the bear’s head. Finally Selection-Invert highlighted only the bear.

Join the PC World newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Scott Mendham

PC World
Show Comments

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Matthew Stivala

HP OfficeJet 250 Mobile Printer

The HP OfficeJet 250 Mobile Printer is a great device that fits perfectly into my fast paced and mobile lifestyle. My first impression of the printer itself was how incredibly compact and sleek the device was.

Armand Abogado

HP OfficeJet 250 Mobile Printer

Wireless printing from my iPhone was also a handy feature, the whole experience was quick and seamless with no setup requirements - accessed through the default iOS printing menu options.

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?