I have been reading Dave Straker’s post about Saturation Masks, and the variety of methods he and others have used to construct them. In looking into this further, I stumbled across a web page written by Tony Kuyper, and he describes a really simple way of creating a Saturation Mask using a Selective Color adjustment layer. A link to his web page is included below:
I have attached a Macros Category (import this from the “hamburger” menu on the Library panel) that includes 6 different macros.
Important Note - Because of a bug in the Selective Color adjustment layer, these macros will not work in version 1.6 of Affinity Photo. However, the apparent bug has been squashed in version 1.7, and the macros give the proper results. At this point, use the macros ONLY in the version 1.7 beta and, presumably, in any version which follows it.
Saturation Mask - Greyscale
This macro creates a greyscale version of a saturation mask, based on a “merge visible” pixel layer that takes all of the visible layers into account.
Vibrance Mask - Greyscale
This macro creates a greyscale version of a Vibrance Mask. A vibrance mask is the inverse of a saturation mask, and favors areas of relatively low saturation. Vibrance Masks can be used to apply adjustments, etc. to poorly saturated pixels, while masking that adjustment from highly saturated pixels.
Saturation Mask - Create Mask
This macro creates a Mask layer out of the greyscale version of the mask. The mask is placed at the top of the layer stack, and can be used as needed.
Vibrance Mask - Create Mask
Similar to the above, this macro creates a Mask layer out of the Vibrance Mask greyscale layer.
Fix OVER-Saturated Image
This macro puts a 50% grey fill layer at the top of the layer stack, and sets the Blend Mode to Saturation. Without anything further, this would have the effect of desaturating all of the colors in an image. However, the macro attaches a Saturation Mask to the fill layer, which desaturates the colors relative to their existing saturation level. (More highly saturated pixels are affected more strongly.) Finally, the macro asks the user “How much desaturation?” should be applied. This sets the opacity of the fill layer, and can change the amount of DE-saturation applied.
Fix UNDER-Saturated Image
This macro puts an HSL adjustment layer at the top of the layer stack, and attaches a Vibrance Mask to the adjustment. The macro asks the user “How much saturation?” and this affects the Saturation slider inside the HSL adjustment. The vibrance mask causes the HSL adjustment to be applied more strongly to pixels with low saturation, and minimizes its effect on highly saturated pixels.