Monday 28 February 2011

colour replacement tool


In a previous tutorial, we looked at the Background Eraser and why it's one of the best tools in Photoshop for removing unwanted areas of an image. In this tutorial, we'll learn all about the Color Replacement Tool and how it enables us to change the color of an object in a photo without a lot of fuss or hassle. You may be wondering what on earth a tool for erasing backgrounds has to do with a tool for changing colors, and the answer is, a lot! Both of these tools use the exact same technology for detecting the pixels in the image that need to be changed. The only difference is that one of them deletes pixels entirely, the other simply changes their color. In fact, they're so similar that if you've already read through the Background Eraser tutorial and understand how its various options work, learning about the Color Replacement Tool will seem a lot like déjà vu.
The Color Replacement Tool is not the most professional way to change colors in an image and won't always give you the results you need, but it usually works well for simple tasks and it's such an easy tool to use that it's worth giving it a try before moving on to more advanced and time consuming methods.
Want an easier way to follow along with our tutorials? Download them as printable PDFs!

Selecting The Color Replacement Tool

The Color Replacement Tool was first introduced in Photoshop CS, and if you're using Photoshop CS or CS2, you'll find the Color Replacement Tool nested under the Healing Brush in the Tools palette. To access it, click and hold your mouse button down on the Healing Brush until a fly-out menu appears, then select the Color Replacement Tool from the menu.
In Photoshop CS3, Adobe changed things around a bit and moved the Color Replacement Tool in with the regular Brush Tool, so if you're using Photoshop CS3 or CS4 (which is what I'm using here), click and hold your mouse button down on the Brush Tool, then select the Color Replacement Tool from the fly-out menu:
The Color Replacement Tool in Photoshop. Image © 2010 Photoshop Essentials.com
In Photoshop CS3 and CS4, the Color Replacement Tool is nested under the Brush Tool. In CS and CS2, it's under the Healing Brush.
With the Color Replacement Tool selected, your mouse cursor will change into a circle with a small target symbol in the center of it. As I mentioned, if you're familiar with the Background Eraser, this will look very familiar to you since both tools use the exact same cursor:
The Color Replacement Tool cursor in Photoshop. Image © 2010 Photoshop Essentials.com
The Color Replacement Tool's cursor is made up of a simple circle with a target symbol in the middle, just like the Background Eraser.
You can adjust the size of the circle directly from your keyboard using the bracket keys, which are found to the right of the letter P on most keyboards. Press the left bracket key ( [ ) to make the circle smaller or the right bracket key ( ] ) to make it larger. To change the hardness of the brush edges, just add the Shift key. Press Shift+left bracket ( [ ) to make the edges softer orShift+right bracket ( ] ) to make them harder.

How The Color Replacement Tool Works

As you drag the Color Replacement Tool over your image, Photoshop continuously samples the color that's directly under the target symbol in the center of the tool's cursor. This is the color that will be replaced, and it will be replaced with your current Foreground color. Any pixels that fall within the larger circle surrounding the target symbol that match the color being replaced will have their color changed. For example, if you pass the target symbol over an area of blue in your photo and your Foreground color is set to red, any blue pixels that the larger circle passes over will be changed to red. There's some options we can set in the Options Bar to alter the behavior of the tool (which we'll look at shortly), but essentially, that's how it works.
You can see what your Foreground color is currently set to by looking at the Foreground color swatch near the bottom of the Tools palette. By default, it's set to black:
The Foreground color swatch in Photoshop. Image © 2010 Photoshop Essentials.com
Black is the default Foreground color, but it's probably not the color you'll want to use.
To change the Foreground color, simply click directly on the color swatch, then choose a new color from the Color Picker. I'll choose a green color, just for fun. Click OK to close out of the Color Picker when you're done:
Photoshop Color Picker. Image © 2010 Photoshop Essentials.com
Use the Color Picker to choose a new Foreground color.
If I look again in my Tools palette, I see that the Foreground color swatch has changed to the new color. If I paint on an image with the Color Replacement Tool at this point, whichever color I drag the target symbol over will be replaced with green:
The Foreground color in Photoshop has been changed. Image © 2010 Photoshop Essentials.com
The newly chosen color appears in the color swatch.
As an example, here's a photo of a young girl holding a balloon:
A young girl holding a blue balloon. Image © 2010 Photoshop Essentials.com
The girl looks happy, but the balloon looks blue.
She may look happy with her blue balloon, but what she really wanted was a green balloon. As luck would have it, I just happen to have my Foreground color currently set to green, so let's see what we can do for her. With the Color Replacement Tool selected, I'll move the target symbol over the blue balloon in the image and click my mouse button. As soon as I click, two things happen. First, Photoshop samples the blue color under the target symbol so it knows which color to replace. Then, any blue pixels that fall within the larger circle surrounding the target symbol immediately change to green, since green is now my Foreground color:
Clicking on the blue balloon with the Color Replacement Tool. Image © 2010 Photoshop Essentials.com
Photoshop samples the blue color and replaces all blue pixels within the circle with green.
To change the rest of the balloon to green, I just need to keep my mouse button held down and continue dragging the Color Replacement Tool over the remaining blue areas. As long as I keep the target symbol over the blue balloon and don't stray off into other areas of the image, which would cause Photoshop to sample a different color, only the blue color will be replaced with green:
Continuing to paint over the balloon with the Color Replacement Tool. Image © 2010 Photoshop Essentials.com
Keeping the target symbol over the blue area as I paint.
If I accidentally move the target symbol outside of the balloon and over the yellow wall behind it, Photoshop samples the color of the wall and begins changing it to green as well:
Accidentally moving the target symbol over the wrong part of the image. Image © 2010 Photoshop Essentials.com
By moving the target symbol outside of the balloon, Photoshop starts replacing other colors with green.
If this happens, simply undo the last step by pressing Ctrl+Z (Win) / Command+Z (Mac), or undo multiple steps by pressingCtrl+Alt+Z (Win) / Command+Option+Z (Mac) as many times as needed, then continue on.

Tolerance

Everything seems to be going smoothly as I paint over the balloon until I get to the edges. If you look closely, you can see some faint blue fringing that the Color Replacement Tool is having trouble with:
Blue fringing appears along the edges of the balloon. Image © 2010 Photoshop Essentials.com
Some of the original blue color remains along the edges of the balloon.
I mentioned a few moments ago that there are several options available to us in the Options Bar for altering the behavior of the Color Replacement Tool, and one of these options is Tolerance. The Tolerance setting determines how different a color can be from the sampled color for Photoshop to replace it with the Foreground color. The default value is 30%, which is a good starting point. Unfortunately, it's not quite high enough in this case for Photoshop to be able to include the shade of blue right along the edges of the balloon.
I'll increase my Tolerance value to 50%, which will allow the Color Replacement Tool to affect a wider range of colors:
The Tolerance option for the Color Replacement Tool. Image © 2010 Photoshop Essentials.com
Increasing the Tolerance setting in the Options Bar.
With a higher Tolerance value entered, I'll undo my last step and try again. This time, as I move along the edge of the balloon, the Color Replacement Tool is able to remove the blue fringing:
Painting with the Color Replacement Tool using a higher Tolerance value. Image © 2010 Photoshop Essentials.com
The blue along the edge of the balloon has been successfully changed to green.
I'll finish painting over the remaining areas as our once blue balloon is magically transformed into green thanks to the Color Replacement Tool and a little boost in the Tolerance value:
The girl is now holding a green balloon. Image © 2010 Photoshop Essentials.com
The Color Replacement Tool was able to change the balloon's color with little effort.
Sampling Colors From The Image
In the above example, I randomly chose a new color for the balloon from Photoshop's Color Picker, but I could just as easily have selected a color directly from the photo itself. To do that, with the Color Replacement Tool active, hold down your Alt (Win) / Option(Mac) key, which will temporarily switch you to the Eyedropper Tool (you'll see your cursor change into an eyedropper). Click on an area of the photo that contains the color you want to use. Photoshop will sample that color and make it your Foreground color. I'll click on the pinkish-red top she's wearing:
Using the Eyedropper Tool in Photoshop to sample a color from the image. Image © 2010 Photoshop Essentials.com
Hold down Alt (Win) / Option (Mac) and click on an area of the photo to sample a color.
If I look at the Foreground color swatch in the Tools palette, I see that the color I clicked on has become my Foreground color:
The Foreground color swatch in the Tools palette displays the sampled color. Image © 2010 Photoshop Essentials.com
The sampled color appears in the Foreground color swatch.
With the color sampled directly from the image, I can paint over the balloon once again with the Color Replacement Tool to change its color:
Coloring the balloon red with the Color Replacement Tool in Photoshop. Image © 2010 Photoshop Essentials.com
The green balloon, originally blue, is now red.
Notice that even though we've essentially painted a color over top of the balloon, it retained its shiny, reflective appearance. If we had simply grabbed the regular Brush Tool and painted over it, the balloon would look like nothing more than a flat surface with no life to it. So how was the Color Replacement Tool able to keep the balloon's texture and reflections? For the answer to that, we need to look at more of the options in the Options Bar, which we'll do next!

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More