Mask color saturation in Photoshop
Further saturation will be called the usual photoshop color saturation, saturation. When processing, sometimes you want to increase or decrease the saturation range of different places in the picture. For example, on a dim winter landscape some color objects add saturation and lower the surrounding snowy expanses, and the snow is often too blue. Such things are easy to do if you manage to select our objects. Nowadays, fashionable and frequent plots, where the author successfully performs a color operation with a single clearly detached object – makes it saturated, and desaturates the rest; but the lasso is not our way. After all, we want to be able to do something similar and, for example, with a blue little house, peeking through the dense interweaving of lightly painted snow-covered branches.
In such (and probably in some other) cases, I would like to be able to create a mask for highlighting saturated areas, obtained not by the manual selection tool, but automatically from the original image itself. Of course, then this mask can be arbitrarily cleaned and, for example, adjusted with curves. That’s actually the whole question. The following is a specific version of this automation. I have never met in books or on the Internet neither this option, nor others; but they probably exist. It would be interesting to see links, compare.
I will speak only for RGB. So, we want to highlight the colored areas in the image. Let us proceed from this interpretation: saturated areas are places where the differences in color channels are large. I offer this interpretation without proof, simply because in the unsaturated gray points all three channels are equal. Therefore, the following algorithm deserves a check: compose all pairwise channel differences and add up their modules. I note that there are only three pairwise differences; signs in FS are indistinguishable, i.e. as the channel differences, the modules are obtained immediately. The differences themselves are easily realized by the “difference” mode for layers, after copying the contents of the RGB color channels into separate layers. Their subsequent summation should be done on the black underlying layer in screen mode, in translation it is sometimes referred to as “screen”, sometimes “clarification”.
It can be said this way: we will try to create a picture that FSH would give us in channel S, if we could translate our image into the HSB color model.
These considerations are not scientific research, have a purely practical orientation and, of course, require a reality check – will there be a layer containing more or less bright areas depending on the saturation of the original image in these areas. The check was done, and the result seemed very successful to me. Having compiled the indicated differences in the FSH and, accordingly, adding them up, I personally and repeatedly made sure that I confidently get the saturation map for any picture; it also should be used further as a desirable mask of selection. For use, it can be placed in an alpha channel or a layer mask. Fitting this map with levels or curves is a great pleasure, you can accentuate the necessary areas very flexibly. Well, and then separately adjust the saturated and unsaturated areas is really very convenient.
Of course, for a convenient systematic use of the proposed operation, you need to make the appropriate macro. I will call a macro that in particular versions of FS, either action, or action, or operation is called. Through the Window menu in the palette (special window) of macro commands, we get access to various manipulations with them. In particular, it is possible to create (record) the macro; as a result, it will be present in the palette with the ability to execute it. You can always save the macro in a separate file with the extension ATN. And you can also always download a macro from a similar file; this is proposed to be made to the reader of this article by downloading the satur_nabor.atn file to yourself. This file contains a macro in two versions (for FS_CS2rus and FSH_7rus) for creating a saturation mask according to the algorithm outlined earlier. For those who want to understand more, I provide comments on the individual steps of the macro for option CS2.
Step by step description of Photoshop Action
In practical testing of both versions of our macro, they naturally gave the same result. In this case, the variant prepared for FSh_7rus worked successfully in the FSh_CS2rus environment; but the option for CS2 was operational only in a CS2 environment. If the process is successful, one new layer of black in shades of gray appears; on it the lighter areas correspond to the more color-saturated areas of the original image, regardless of the color shades themselves.
So, download the file satur_nabor.atn and apply the Load command to it in the Macro Palette. Our macro commands will become available, and for any picture you can execute one or the other option; they are named satur_CS2 and satur_PS7.