Replacing colors in an image
With the Replace Color command, you can create temporary masks based on specific colors and then replace these colors. (A mask isolates an area of an image so that changes affect just the selected area and not the rest of the image.) The Replace Color dialog box contains options for adjusting the hue, saturation, and lightness components of the selection: Hue is color, saturation is the purity of the color, and lightness is how much white or black is in the image.
You’ll use the Replace Color command to change the color of one of the tulips in the image we’ve been correcting throughout this lesson.
- Select the Rectangular Marquee tool (), and draw a selection border around the yellow tulip in the left foreground of the image. Don’t worry about making a perfect selection, but be sure to include all of the yellow flower.
- Choose Image > Adjustments > Replace Color.
The Replace Color dialog box opens, and by default, the Selection area displays a black representation of the current selection.
Notice the three eyedropper tools in the Replace Color dialog box. One selects a color; the second adds a color to the sample; the third removes a color from the sample.
A. Eyedropper tool
B. Add to Sample eyedropper
C. Subtract from Sample eyedropper
- Using the Eyedropper tool (), click anywhere in the yellow tulip in the image window to sample that color.
- Then, use the Add to Sample eyedropper () to sample other areas of the yellow tulip until the entire flower is selected and highlighted in the mask display in the Replace Color dialog box.
- Drag the Fuzziness slider up to 45 to increase the tolerance level slightly.
Fuzziness controls the degree to which related colors are included in the mask.
- If the mask display includes any white areas that are not part of the tulip, get rid of those now: Select the Subtract from Sample eyedropper () and click those areas in either the image window or in the Replace Color mask display to remove those stray pixels. (It’s OK if a few remain in the selection.)
- In the Replacement area of the Replace Color dialog box, drag the Hue slider to –40, the Saturation slider to –10, and leave
the Lightness slider at 0.
As you change the values, the color of the tulip changes in hue, saturation, and lightness, and the tulip becomes red.
- Click OK to apply the changes.
- Choose Select > Deselect, and then choose File > Save.