This month’s tutorial is courtesy of our friends at Deke.com. You can view the original article here.
If you’ve ever seen a Photoshop demo, you’ve probably watched someone change the color of a car (or other object) using the well-worn method of targeting and shifting colors with the Hue/Saturation command. Problem is, while this technique is straightforward and even sexy, it rarely works as advertised.
In this article, we’ll change the color of a car. However, instead of applying Hue/Saturation in its relative mode, we’ll employ it in its absolute mode to achieve not just successful but stellar results. Then we’ll use a channel, a mask, and a couple of blending options to turn the car black. The original car (red) and its alternatives appear below.
Today’s article is based on Deke’s Techniques 054 and 055, presented by lynda.com. The base image comes from the Fotolia image library.
In case you’re unfamiliar, here’s the standard routine for changing one color in a photograph independently of others: Add a Hue/Saturation adjustment layer, select a color range from the topmost pop-up menu, and then modify the Hue setting as desired. Photoshop shifts the targeted hues on a relative basis, adding or subtracting some number of degrees to or from the original color. When the technique works, it does so because the color you want to change doesn’t mix much with the other colors in the image. But when the colors overlap, as is almost always the case, the results disappoint, as exhibited by the example below.
In this case, pushing the Hue slider any further to the right will begin to shift the tones that are already gold into the greens before the remaining rose turns gold. This is the case even when you adjust the color range selection sliders at the bottom of the panel.
The more effective method is to apply the Hue Saturation layer in the Colorize mode. That mode looks at the underlying luminosity of the image and applies colors in an absolute fashion. To use it, you click the Colorize checkbox in the Adjustments panel and select the appropriate Hue and Saturation settings. However, the mode shifts the colors of everything and there’s no option to target specific hues. You can see that the targeting menu is set to Master and is grayed-out:
So, we need to create a mask to constrain where the adjustment is applied within the image. To do that, we’ll use the Color Range command to make a selection and then turn that selection into a mask. If you’re following along, and you’ve just created a Hue/Saturation layer, click its eyeball icon to turn it off.
To invoke the Color Range command:
1. Click on the Background layer to select it.
2. Choose Select > Color range from the menu bar to bring up the dialog.
3. Set the Fuzziness to 40
4. Be sure the bottom radio button is set to Selection
5. Set the Selection Preview to None.
6. Click in the image area to sample some of the red. You’ll see an area of white appear inside the dialog. The white that you’re seeing will become the white areas of your mask, which is where the adjustment will be applied. The black areas will not be affected by the adjustment.
7. Hold the Shift key and drag in short to medium strokes to select more reds.
8. The white area in the dialog will expand to show the areas being selected. Be careful with the extremely bright or dark areas — they can cause your color range to spill over into areas you don’t want.
9. If you go too far, you can immediately undo with Control/Command + Z, or you can hold down the Alt/Option key to convert the Cancel button into a Reset button and then click it to start over.
10. Optional: In some cases, you can refine the selection by increasing the Fuzziness setting slightly.
Make sure the Invert check box is off.
11. Click OK to create a selection of marching ants.
12. When we create a new Hue/Saturation layer, the selection will automatically be converted into a mask that localizes the adjustment to the selected area.
13. Select Hue Saturation from the menu inside the black and white circle icon at the bottom of the Layers panel.
14. Click the Colorize check box in the Adjustments panel, then set the hue to 40 and the saturation to 65.
** Do not adjust the Lightness setting. ** That setting almost invariably ruins your image.
15. To further refine your color conversion, you can change the blending mode of the Hue/Saturation layer to Hue, which produces a more lustrous effect:
It’s worth pointing out that this technique for altering color in your images is not only more effective, it’s more flexible.
“Painting” the car black
To turn the car black, we can’t rely on the colorize option, since black is not part of the hue wheel. Instead, we’ll start by looking at the Channels panel to find the one that provides the best starting point for a black car and use blending techniques to create a believable, lustrous effect.
If you’ve been following along with your own file, we’re going to begin work as though the file has only the background layer. You can simply turn off the Hue/Saturation layer and ignore it for now.
1. Click on the background layer to activate it.
2. Activate the Channels panel and click on each one to to determine which provides the best version of a black car. In this case, the green channel is a clear winner.
3. Click on the RGB thumbnail in the Channels panel to reactivate the color image.
Now, we’ll use the Apply Image command to convert a copy of the Green channel into a layer.
4. Activate the Layers panel
5. Use Ctrl/Command + Shift + N to create a new layer.
6. In the New Layer dialog, name the layer “black” and click OK.
7. Select Image > Apply Image from the menu bar. The Apply Image dialog will appear.
8. Set the Layer menu to Background, the Channel menu to Green, and the Mode menu to Normal. (The Source menu will default to whatever name you have given your working file. You don’t have to change it.)
The result is a layer in black and white that dominates the image. We’ll use a mask to apply the black where we need it.
9. Click the eyeball icon on the black layer to temporarily turn it off.
10. Click the background layer to select it.
11. Use the Color Range command to select the red parts of the car, just as in the case of colorizing above. After you click OK, you’ll have a selection of marching ants as before.
12. Click the black layer to select it and click its eyeball icon to make it visible again.
13. Click the Add Layer Mask icon at the bottom of the Layers panel.
Close inspection may reveal that there are some small holes in your mask, where the underlying red color shows through in areas that are supposed to be black. If that’s the case, you can click on the layer mask thumbnail to select it and then use the brush tool to fix any holes. Set the foreground color to white, and both the opacity and hardness to 100%. You can make the brush fairly small and apply brush strokes to white-out any holes in the mask and make the red disappear.
To make the color of the black car more believable, we’re going to infuse a bit of the sky color into the car. We’ll sample the sky color to figure out what values to use.
14. Click the eyeball icon to switch off the black layer
15. Tap the letter I key to activate the eyedropper tool
16. Click in the area of the sky to sample the color
17. Activate the Color panel (If you don’t see it, select Window > Color from the menu bar).
18. If you can’t see the HSB sliders in the panel, use the fly-out menu in the upper right corner to switch the display.
19. Make note of the H and S values
Now we’ll use those values to colorize:
20. With the background layer selected and the black layer invisible, hold down the Alt/Option key and select Hue/Saturation from the New Adjustment Layer menu at the bottom of the Layers panel.
21. When the New Layer dialog appears, name it “blue sky” and click OK.
22. Turn on the Colorize checkbox in the Adjustments panel and then set the Hue and Saturation values: We’ll round off the hue to 225, but use a low saturation value (after all, the surface of the car isn’t a mirror) — in this case, 15%.
To apply the colorization to the body of the car only, we’ll duplicate the layer mask from the black layer:
23. Hold the Alt/Option key and drag the thumbnail of the black mask onto the blue sky layer.
24. If a confirmation dialog appears, click Yes to replace the existing layer mask.
Now, to integrate the pieces: We’ll use the Multiply blending mode to integrate the black layer and a Luminance slider to bring out a touch more of the blue sky highlights.
25. Click the black layer to select it and click its eyeball icon to make it visible.
26. Change the blending mode of the layer to Multiply.
27. Double-click the blank area above or below the label text on the black layer to open the Layer Style Blending Options dialog.
28. Drag the right-hand slider on the Underlying Layer control toward the left to reveal highlights from the layer below. At first, the transition will be abrupt.
29. Hold the Alt/Option key down and drag the right edge of the slider to the right to separate it into two pieces. Once the pieces separate, you can release the key.
30. The for this image, we dragged the right half all the way back to 255 and moved the left half to 50:
31. Click OK to apply the Layer Style and reveal the final result:
And that, friends, is the more elaborate but also more reliable way to adjust a discrete range of colors in Photoshop.