Color Swap Tool in Photoshop

The ingenious developers of the Adobe pearl, probably, did not even suspect that the Color Swap tool in Photoshop would become, among other functions, one of the leaders in frequency of use.

Repainting brush

You'll find a brush with the name Color Replacement in the Brush tool group (in Photoshop CS3 and younger). This tool is good for its simplicity (for repainting objects, you can do without laborious selection), but at the same time it is not entirely predictable.

color replacement in photoshop

In fact, this color substitute with a cursor in the form of a circle with a cross works like a normal brush, filling the area with the first (primary) color while preserving the textural and structural features of the image, but with some reservations.

Firstly, unlike a normal brush, in its settings, in addition to size and hardness, you can set intervals (when moving), the angle of inclination and the shape of the print, as well as adjust the pressure of the pen (when using graphic tablets).

In the process of painting, the program continuously analyzes the paint within the brush print, replacing it with the specified color as the primary color in accordance with the selected mode.

The default mode is "Color", in which the color and saturation change, but the brightness remains the same, and the new hue, of course, will not exactly match the selected color.

In the "Brightness" mode, the original tone is retained, but the brightness changes.

In the "Color Tone" mode, the color changes to the declared paint tone, and the original brightness and saturation remain.

Choosing the "Color" option, we will change the saturation, while maintaining the brightness of the original paint.

In the "Saturation" mode, brightness is maintained, but the tone of the original color and its saturation change.

To the right of the mode window in the settings panel at the top are three options for sampling.

Selecting the first one ("Continuous"), we instruct the program to constantly scan color in the area of ​​the brush print while we hold the button, painting over the object.

If we select “Once,” the color sample taken at the first click will be used as the sample. This option is suitable for uniformly colored areas.

In the third version ("Background Pattern") only areas related to the background color will be repainted.

The Constraints option determines the extension of the substituted color, as the hover prompts.

The "All pixels" option provides for the replacement of all pixels in the "cursor-sight" area of ​​the brush. Selecting "Adjacent pixels" (set by default), we paint over within the brush print only those that are adjacent to the color pixels immediately below the cross. In the "Edge Selection" mode, all pixels of the sample will be repainted, but with an emphasis on the edges.

In principle, by choosing the appropriate brush size, you can confidently repaint in the boundary areas of the object, even accidentally crawling into a different color, if the "Tolerance" parameter is correctly selected, which determines the error when choosing relative colors, as the prompt says. With increasing tolerance, the spectrum of replaced tones expands, and vice versa.

Thus, we can conclude that the “Color Swap” brush in “Photoshop” is a fairly flexible tool, and despite its “straightforwardness”, it can do a lot of “skill” in skilled hands.

All commands that can dramatically change the color without destructive consequences for the image are in the "Correction" list in the "Image" menu. These are features such as Color Balance, Hue / Saturation, Selective Color Correction, and Replace Color.

In the mode "Color tone" - object "chameleon"

Another undeservedly rarely mentioned and infrequently used method of color transformation lies in the modest blending mode "Color Tone". Having selected the adjustment layer "Color" and indicating the desired paint, the blending mode on this layer is then changed to "Color Tone". The object, of course, will not be repainted exactly in the given color, but the hue will change. If you double-click then on the thumbnail of the fill of the adjustment layer, the color palette opens, and you can iterate over the options, observing the effect of the chameleon on the canvas.

The excess is erased with a soft black brush on the mask of the adjustment layer, which is why it is good.

Of course, there will be more fuss with colored objects, so it is better to repaint objects that are more or less uniform in color in this way.

Instead of the adjustment layer, you can create a new layer, change its blending mode to “Color tone” and, after choosing the desired color, paint over the object with a brush, then correct the flaws with an eraser.

color replacement in photoshop cs6

A bit about color balance

Having chosen the "Color balance", we can pre-repaint the selected object using the color pairs "Blue - Red", "Purple - Green" and "Yellow - Blue". The tone balance is adjustable in shadows, highlights and mid tones.

color replacement tool in photoshop

Hue and saturation

Tone correction and saturation adjustment functions are very often used for tasks such as replacing colors in Photoshop.

The color change algorithm in the dialog box called by the "Hue / Saturation" command is based on adjusting the hue, saturation and brightness parameters. Here we can shift the overall color gamut of the picture or the selected fragment (object) and adjust the colors individually in different parts of the color range, choosing the desired tone with a pipette.

hair color replacement in Photoshop

In the list of ranges below (under "Style"), where the default is "All", there are six more color ranges that can be processed simultaneously, but with separate parameters.

Given the power of the tool in terms of color correction, repainting the selected object here is not difficult.

Selective color correction

This function allows you to change colors according to the model, not HSB (hue, saturation, brightness), but CMYK, controlling the amount of cyan, magenta, yellow and black in the selected color. Selecting the object to be repainted in the image, select the necessary color group in the "Colors" window and adjust its composition using the sliders.

Sometimes, instead of the Selective Color command in the Image> Correction menu, it is better to use the same adjustment layer (Layers> New adjustment layer or the button on the layer panel at the bottom). In this case, it becomes possible to correct the effect on the mask of the adjustment layer with the removal of all unnecessary black brush.

white color replacement in photoshop

Replacing white and black

Changing the color with the help of the corrective functions, you may notice that the white color does not lend itself to repainting in this way. Replacing the white color in Photoshop is very simple: if you select this area first, and then, after deleting, repaint it.

However, this cardinal decision is destructive. It is justified only if it is not the original drawing itself that matters, but its color. And if you just want to give the white color a different hue, try putting the picture in CMYK mode and using the "Selective Color Correction" function, and then return to the RGB color space.

Depending on the uniformity of the color, you can use any tool from the extensive arsenal of Photoshop tools for highlighting (Magic Wand, Quick Selection, Background Eraser, Magic Eraser, etc.), but the most common option is Color Range "in the" Selection "menu. And how the new color takes root at the place of the removed white, directly depends on the quality of the selection.

By the way, if you need to replace black in Photoshop, all the arguments regarding repainting white are also valid for this case.

Replace color

This command from the Correction list in the Image menu (or the corresponding adjustment layer) is easier to use than Hue / Saturation, and its results are more predictable.

color replacement brush in Photoshop

In the dialog box, we draw with the help of pipettes the paints to be changed. Slider "Color tone", "Saturation" and "Brightness" achieve the desired effect. To control the selection, it is better to select the "Selected area" checkbox (the image will be displayed as a mask). The "Spread" slider is used to correct scatter beyond the border of the selected area.

This color replacement method is most effective for contrasting and not-so-colorful images.

Lab mode repainting

One of the most quick and relatively simple ways of repainting objects is to replace the colors in Photoshop using the Lab color mode, although to effectively use this method, it is desirable to have at least some idea of ​​the Lab color space.

So, the L coordinate sets the brightness (luminosity) value, determined in the range from 0 (darkest) to 100 (lightest), and the color parameters are set by the coordinates A (color in the range from green to red) and B (color in the range from blue to yellow).

Thus, in Lab, the brightness value is separated from the chromatic color parameters, which makes it possible to act separately on the brightness, contrast and color of the image. It is this circumstance that sometimes allows you to speed up image processing, for example, if it is necessary to replace the color.

True, for repainting colorful colorful objects and objects with complex contours (hair, fur), this option is not suitable. Let's say you need to change the color of a passenger car. In Lab, replacing the color in Photoshop involves, first of all, translating the image into this mode.

eye color replacement in Photoshop

We translate the picture into Lab mode (Image> Mode> Lab), then select the desired color from the libraries by going to them by double-clicking on the main color in the toolbar, and remember the values ​​of the channels L, A and B.

In the "Eyedropper" tool group, select the "Color standard" and put a label (control point) in the representative area of ​​the auto color to be replaced, thereby calling up the "Info" panel.

Now we add the “Curves” adjustment layer and for each channel we find the position of the curve in accordance with the fixed values, referring to the “Info” palette.

The curves of channels A and B must necessarily intersect the center of the graph, and the curve of the channel of brightness L must certainly keep the angle of inclination.

Now double-click on the image layer to open the window "Layer Style, Blending Options". We shift our attention to its lower part (“Overlay, if”). Here, by manipulating the engines for each parameter (L, A and B), we separate the car from the background or other objects.

Repaint everything

Having mastered the above methods of replacing color, you can repaint almost any object. Depending on its complexity, one method or another may be preferable. For example, replacing the hair color in Photoshop is easily accomplished using the correcting functions “Color Tone / Saturation” and “Color Balance”, but the main task here is to qualitatively select an object with such a complex (as a rule) contour.

Most often, a quick mask is used for selection (a button with a dotted little ring at the very bottom of the toolbar). Then the selection is adjusted using the special features of the "Refine Edge" command in the "Selection" menu.

The selected area is usually copied to a new layer (Ctrl + J), then the painting tools mentioned above are applied to it.

And such simple tasks as replacing eye color in Photoshop, where standard selection tools are used, are generally solved in two ways. The eye can be distinguished by selecting "Lasso" or "Oval" (for the pupils), then, as in the previous case, replace the color by applying the correction "Color Tone / Saturation".

The "Color Swap" brush also does a good job of this.

Everything is still with color

Most of the user requests related to repainting objects in the Photoshop program, as a rule, do not specify a specific version of the editor, and if indicated, the color replacement in Photoshop CS6 is of much interest to others.

Perhaps this is due to a more significant update of the program in relation to the previous version than it did before. The changes affected the background save and autosave functions, selection, cropping tools, Magic Wand and Eyedropper, brush options, some filters, fill functions, layer editing, interface color, and much more.

There are new possibilities for working with text, editing RAW files in the new version of Camera RAW7, gradient fills, artistic stylization of images, video editing, searching for the desired layer in multilayer documents, as well as a new color correction Color Lookup, etc.

Nevertheless, the correction functions in the “Correction” list in the “Image” menu did not undergo any special changes during the program modernization, therefore repainting objects, for example, in CS2, and replacing the color in “Photoshop CS6” practically do not differ in essence. This remark is for those owners of earlier versions who believe that new versions have more options for replacing colors.

Source: https://habr.com/ru/post/K9046/


All Articles