The Saturation Mask .8bf Plugin
Version 1.12, updated 3/15/2017

Saturation Mask Plugin LCH:  L*a*b* Lightness, Chroma, Hue
LSH:  L*a*b* Lightness, Saturation, Hue
HCY:  Hue, Chroma, Luma
HSL:  Hue, Saturation, Lightness
HSV/HSB:  Hue, Saturation, Value or Brightness
HSI:  Hue, Saturation, Intensity

Saturation Mask converts an image according to one of a number of color models and extracts the saturation or chroma channel.  It then inverts the extracted image and applies auto levels to fully expand the range from black to white.  Use the image as a mask to convert a hue/saturation control to a custom vibrance control.

Set the Color Model, then set the L* Working Space if applicable (for LCH or LSH).  Some basic concepts:

• Saturation represents the distance a color is from white.  Very dark, almost-black colors may have high saturation.  HSL is the only space in which very light colors can also be highly saturated.

• Chroma represents the distance a color is from the gray axis.  Since black and white are both on the gray axis, very light and very dark colors are treated equally, and tend to have low chroma.

• The L*a*b*-based spaces (LCH and LSH) are device-independent, and if properly applied, the results will not depend on the working space of the image.  This is not true of the other spaces.

The image below has a saturation gradient from top to bottom, and a lightness gradient from left to right.  Note that all of the saturation output spaces consider dark colors to be saturated.  The chroma spaces represent what I think most people intiutively consider “color saturation” to be.


Version 1.12 has replaced HCY’s chroma from the YCbCr space (Cb2 + Cr2) with that of hue, chroma, luma (max(R,G,B) - min(R,G,B)) as it is more perceptually uniform.  A bug was also corrected that prevented full masking of all colors in LCH.

Of note, Photoshop, PhotoLine, and perhaps other image editors appear to use chroma rather than saturation for the Hue/Saturation adjustment and Saturation blend mode.  The first image on the left is the saturation gradient image above, layered on top of itself and desaturated with the Hue/Saturation control, blend mode Difference.  Notice that the effect of desaturation takes the shape of the chroma images above.  The second image is the gradient image again, layered on top of a solid red background, blend mode Saturation.  The same pattern is evident.


When using the plugin adjustments, remember that the image is a mask; more = darker.  Lighter areas are less saturated in the original image and, being less masked, will be more affected by a saturation control.  The Black slider moves the low end of the value range like a levels control.  Move it all the way to zero to bypass auto levels.  Curve applies a simple gamma curve to lighten or darken the image.  When both sliders are set to zero, the resulting image is the inverted but otherwise unmanipulated saturation or chroma channel.  Invert results in a “reverse vibrance” mask; saturation adjustments target the more highly saturated values.  16-bit images work best; 8-bit images may show banding and noise.

To use, create the mask, then apply it to a hue/saturation adjustment layer.  It then becomes something like a vibrance adjustment whose color ranges can be adjusted independently.  Use Preview to see the effect of the mask.  The preview histogram is a saturation histogram. White (background) is the original image; black (foreground) is the processed image.


How to create and apply the mask

Open an image


Select — All
Edit — Copy (Merged if applicable)
Edit — Paste

Or, right click the background — Duplicate Layer

Filter — RC Filters — Saturation Mask
Select — All
Edit — Copy
Hide the mask layer (click the eyeball icon)
Layer — New Adjustment Layer — Hue/Saturation
OK (no adjustments yet)
Alt+click the adjustment layer mask to show it
Edit — Paste
Alt+click the layer mask to hide it

Now adjust the Hue/Saturation layer.


Layer — New Adjustment Layer — Hue/Saturation
OK (no adjustments yet)
Edit — Merged Copy (note:  Duplicate Layer sometimes causes unexpected results)
Edit — Paste as Layer
Filter — RC Filters — Saturation Mask
Layer — Merge Down (into the Hue/Saturation layer)

Now adjust the Hue/Saturation layer.


Download the zipped file, then copy SaturationMask.8bf into your plugins folder.  It will appear under “RC Filters.” version 1.12, 315 KB, 64-bit applications.  It works for me in Photoshop CS5 and PhotoLine 20, Windows 7. version 1.12, 312 KB, 32-bit applications, Windows 32 or 64 bit.  It works for me in IrfanView 4, Windows 7. |  source code

A one-time payment of $5.00 is requested; thank you.

Or click through an Amazon link and go shopping.

© 2017 by Russell Cottrell; released under the GNU General Public License.
Updated 3/15/2017.