Photoshop: How do I create a saturation mask?

  • 5
  • Question
  • Updated 6 months ago
  • Answered
  • (Edited)
I'd like to perform an operation to perform "curves" effect on the saturation of image.

Curves can already work on Red, Green, Blue, or RGB.

This would be an effect that converts the RGB to HSB, and applies the "Curves" effect to only the "S" while leaving the H and B unchanged for each pixel.
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes

Posted 7 years ago

  • 5
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
Basically curves to change saturation in the Hue Saturation adjustment?

Do you need to control it per hue, per saturation, or both?
(both are used in some video editors)
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
There are various places where you could implement this, and various extents to which you could choose a more or less robust implementation.

The feature that compelled me to ask for this feature would simply be a "saturation" option for the Curves adjustment.

Having additional options to effect hue and brightness in the same way would be nice too, but not as important as saturation for me.



Adjustments for HSB would also be perfectly well suited to being added to the "levels" adjustment, and one could envision a version of this idea where "curves" manipulators could optionally replace the sliders in the Hue Saturation adjustment.

My preference would be to have HSB options for the Curves adjustment, but any of the above solutions would be great.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 769 Reply Likes
Ok, so that would just map saturation to saturation (and wouldn't be great in curves because of precision loss, bad UI match, etc.).
Photo of Andrew Rodney

Andrew Rodney

  • 476 Posts
  • 76 Reply Likes
LinoColor had a saturation curve dating back a good 8-10 years. I suspect this is the geniuses of the request. FWIW, it worked quite well and for some images, was kind of useful because you could as an example, lower saturation in shadows. You can do that today with channels (generated from a CMYK iteration, using the black channel) but its a lengthy process.
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
Actually, my ideal solution, but which I didn't mention because I figured it would be more difficult to implement would be to be able to get the saturation as a mask.



That way, I could do whatever I wanted with it.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 748 Reply Likes
Creating a mask is actually easier than any of the previous suggestions, but it doesn't accomplish the same thing you were previously talking about.

What are you trying to accomplish?
What problem are you trying to solve?
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
Well, if I took that saturation channel, and used it as a mask for a Hue and Saturation adjustment layer, then I'd be able to get a pretty similar effect to what the Saturation Curves would grant me. i.e. the ability to increase saturation on the most saturate parts of an image while simultaneously decreasing saturation on the less saturation parts of the image (via inverting the mask with a separate hue_saturation adjustment).

The inspiration for this feature was in comparing an image viewed on my Cintiq .vs an image displayed on an iPhone.

I tinkered with monitor calibration and color settings for a while, but the problem was more complex than any of the settings available could help me solve. The problem was not a simple as one being brighter or an overall difference in saturation or contrast... The hue was not skewed. The problem was more complex.

It seems that the display of the iPhone tends to exaggerate the saturation of the most saturated parts of an image and understate the saturation of the less saturated parts of an image. In understand that this may just be an effect of the screen, but visual result was something like this:

BRIGHTNESS= MAX(red,MAX(green,blue);
MIN = MIN(red,MIN(green,blue);
SATURATION= (MAX-MIN)/BRIGHTNESS;
COLOR_AVERAGE = (red+green+blue)/3
SATURATION_EFFECT = (SATURATION-.5)*2 //creates scale of -1 to 1

red += (red-COLOR_AVERAGE) * SATURATION_EFFECT
green += (green-COLOR_AVERAGE) *SATURATION_EFFECT
blue += (blue-COLOR_AVERAGE) *SATURATION_EFFECT

--------SAMPLE DATA-------------
192 128 64 =213 128 43
160 128 96 =154 128 102
128 128 128 =128 128 128
96 128 160 =102 128 154
64 128 192 =43 128 213

Obviously, this code would need to be improved, but it illustrates the effect:
colors that are close together get closer together. Numbers that are far apart get further apart.

Not only was this effect very difficult to reproduce in Photoshop, but it was very cool looking. I figured, it might be handy tool to have around all of the time. After all, I can get the image brightness independent of the hue and saturation... I can get the hue independent of the saturation and brightness. Why can't I get the saturation independent of the brightness and hue?



The closest I could get was a system similar to this:
http://www.luminous-landscape.com/tut...
But the above system is flawed since hue affects brightness, and different colors of the same saturation can have different brightness depending on the hue.

So, as far as I can tell, there is no way to accurately get the saturation levels independently of the color and brightness within Photoshop.

Thanks -Rory-
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 764 Reply Likes
OK, that helps clarify what you're after much better. Thank you.

Yeah, using the HSBHSL plugin to get a mask is currently the only easy way to do that. You can also use channel math and/or blend modes, but it'll take a lot more steps.
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
Ah Ha!

That HSBHSL plugin get's the job done just fine.

Set up a photoshop action to create a new file, make the conversion, grab the saturation, and copy it back into the original image.

I'm set. Thank you so much

-Rory-
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 770 Reply Likes
that's one of the reasons I wrote that filter :-)
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
Well done sir.
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 45 Reply Likes
Another way to make a Saturation mask:

Selective Color Adjustment Layer:
Absolute mode.
For each color channel drive the black slider all the way left.
For each Neutral (White, Black, Gray) drive the black slider right.

Make a mask from one of the channels, then delete the Sel Col layer.

By saving this setting it's very quick to add the adj layer, choose the preset from the pull down menu and you're there. A hot key action would be even faster.
Photo of Casey Gorsuch

Casey Gorsuch

  • 1 Post
  • 0 Reply Likes
Oh man, this is exactly what I've always needed. I've tried so many other solutions, but yours was the best so far, thanks!
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14100 Posts
  • 1749 Reply Likes
Wondering if we should change the topic type to question: "How do I create a saturation mask?" and mark the topic as answered? (...figuring the best way to make the topic more relevant/useful to the community)
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
I think that's a totally reasonable idea
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 813 Reply Likes
I still like the feature request for saturation curves, even if he has a workaround for now.
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
I still like that idea too. I can basically make the adjustments I was looking for with Chris's plugin, but the curves would be great.
Photo of PECourtejoie

PECourtejoie, Champion

  • 792 Posts
  • 283 Reply Likes
Jeff, I think this should be saved as a default setting in the selective color drop down. (sat mask in channels, for instance)
Photo of Scott Mahn

Scott Mahn

  • 178 Posts
  • 45 Reply Likes
FWIW, have you tried messing with a curves adjustment layer set to saturation blend mode? Go in to the individual curves channels and play around, it's fun.
Photo of Luca

Luca

  • 3 Posts
  • 0 Reply Likes
I would like to be able to select saturation only (now you can only select light/dark areas or areas belonging to a specific color). Such Photoshop feature woud enable us to make a mask according to saturation and thus apply effects gradually according to the level of saturation (like, for example, sharpening only the least saturated areas).

This reply was created from a merged topic originally titled
Select saturation only (and not lightness/darkness or just a color).
Photo of rory lutter

rory lutter

  • 37 Posts
  • 7 Reply Likes
Scott Mahn's answer worked for me.

Selective Color Adjustment Layer:
Absolute mode.
For each color channel drive the black slider all the way left.
For each Neutral (White, Black, Gray) drive the black slider right.
Photo of Royi

Royi

  • 28 Posts
  • 5 Reply Likes
Actually today many Luminosity Mask panels offer Saturation Mask as well.

I also encountered 2 plug in's which can do the work very nicely:
The NBP Lumizone has a nicely done video on Saturation Mask - NBP Lumizone for Photoshop | Saturation Masking.