# Get exact color with Hue/Saturation layer on Photoshop

I have a card with colored borders.

I want to have a way to change easily the color without redo my border (because of the pattern on it).

Currently, I have a Hue/Saturation layout with a mask on my borders, to change the color, but the issue is I don't understand how to work the sliders to change HSB.

I want a specific color, for example 309, 54, 91 (HSB), and my current color is 112 94 82. By groping, I found -163, +9, +42 on the Hue/Saturation layer properties. I think Hue is just 112 - 163 on the bound [-180, 180], but I don't found the logic behind the two others values…

To summarize, what I would like is the 3 functions `f`, `g`, `h` such as:
`f(309, 112) = -163`
`g(54, 94) = 9`
`h(91, 82) = 42`

And that would work for just about any color.

I believe the confusion comes from the fact that the Hue/Saturation adjustment offers to manipulate Lightness, not Brightness. HSB (Hue/Saturation/Brightness, also called HSV) isn't the same as HSL (Hue/Saturation/Lightness).

You can read about the difference on Wikipedia's article on HSL and HSV.

From that article we learn that conversion from HSV to HSL goes like this:

And the other way from HSL to HSV:

So to find the values you need to input in the Hue/Saturation adjustment, you would need to calculate the HSL values of the source color and the HSL values of the target color and find the difference. Then you just have the problem that the Saturation and Lightness sliders don't seem to work in an absolute way, but are relative to the values you have already. And another hurdle is that the Hue slider doesn't affect neutral colors.

I'm not going to do the algebra here and I'm also not entirely sure about the math behind Hue/Saturation adjustments. But I also never face that problem! It's much easier to work in another way, where you don't have to do calculations like this.

Instead of manipulating an existing color with a Hue/Saturation adjustment with a mask, I suggest removing/erasing/stamping the border so it's not part of the background and add it by using a Solid Color layer with a mask. Perhaps you can simply reuse the mask you already have. That way you can choose any color you want without doing any calculations.

An even better solution would be to work in a vector based application like Illustrator or InDesign which are much better suited for tasks like this. Depends a little on how your artwork looks though.

• Thank you very much! I have the software in French, and it seems that the translation for HSB and HSL is the same... Hence the confusion. I will look for functions to switch from HSL to the relative value, because I don't really have ways to convert to vectors or to use color layer because of the pattern on my border (already on a separate layer) Commented Apr 18, 2021 at 22:46
• OK. It would be nice to see your artwork though, because I can't really understand why you can't use a solid color layer. If you want to change the color of the border and the pattern you talk about, you just have to convert them to grayscale and use that image as mask on the solid color layer. If you only need to change the color of the border and not the pattern, you need a mask for the Hue/Saturation layer anyway, so why not use that mask on the solid color layer? Commented Apr 19, 2021 at 6:41
• The pattern is on a border. In fact, some of the borders are made with a specific brush, and I don't want to lose the patterns created by them.I'm note graphist, so maybe it isn't the good word for describe it, sorry. Here a screenshot of my borders: imgur.com/a/WOwEn3j I want to change all the pink color with a specific color without having to redo my borders. So the hue/saturation layer seemed the most appropriate to me Commented Apr 19, 2021 at 9:10