Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
4

I want to know the formula to change a single color to a target color by hue saturation based on HSB

Community Beginner ,
Jan 14, 2024 Jan 14, 2024

I would like to know the formula to change a single color to the desired color based on the HSB value in the hue saturation adjustment layer.

For example
H0
S2
B97

to

H15
S14
B86

If you want to change it to

Hue (H): target 15 - original 0 = +15
Saturation (S): 14 of target - 2 of original = +12
Lightness (B): 86 of target - 97 of original = -11

would result in a color that is less saturated than the target color.
I would appreciate it if you could tell me if you know the formula to calculate how much to change the hue saturation lightness from the HSB value to the target color.

Thank you in advance.

TOPICS
Windows
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jan 15, 2024 Jan 15, 2024

Photoshop hasn't had an HSB colour mode for a long time (there were plugins), so it is now a mathematical representation/subset of RGB – and RGB results depend on the ICC profile assigned to the image.

 

The closest that I could get in sRGB was as per the attached image:

 

2024-01-15_21-54-02.png

 

Using color samplers and the info panel, with the adjustment layer parameters:

 

H: +15

S: +87

L: -16

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 15, 2024 Jan 15, 2024

Thank you.
So, does that mean that currently there is no way to calculate to find how much to change?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 15, 2024 Jan 15, 2024

May I ask what the reason for your query is? 

 

Do you have to make such »numerical« edits at a high volume (or often)? 

What is the place of this step in your larger workflow? 

What is the sort of images you need to edit thusly (renderings, graphics, photographs, …)? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 15, 2024 Jan 15, 2024

I want to numerically control shadow colors and color changes caused by light sources in the creation of illustrations and graphics, and I want to strictly control the workflow involving multiple people without misalignment.

 

Once the HSB formula is known, I would like to use it to create rules for color changes due to light and create scripts to streamline the workflow so that the same results can be obtained no matter who is working on the project.

 

 

Translated with www.DeepL.com/Translator (free version)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 15, 2024 Jan 15, 2024

If you need to separate color and luminance components, I would rather recommend doing it in Lab, which is fully defined and unambiguous.

 

HSB is undefined and relative to everything else - not only the color space, but also itself. For instance, a saturation increase of a certain value will look very different when applied to shadow, midtone or highlight values.

 

There's a reason HSB is not a defined color mode in Photoshop. It just doesn't refer to anything specific and solid.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 16, 2024 Jan 16, 2024

Thank you.
However, I want to load and run the graphics I have created in Ae, but Ae does not allow psd's with color mode lab to be loaded with layers retained.
Is there any way I can do this while the color mode is RGB?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2024 Jan 16, 2024
quote

Is there any way I can do this while the color mode is RGB?

What exactly is »this«? 

Could you please post screenshots (including all pertinent Panels) to illustrate the exact process and how which element is supposed to influence which other element/s? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 16, 2024 Jan 16, 2024

Sorry.
Is there any way to calculate and control the light changes numerically using an adjustment layer while the color mode is RGB?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2024 Jan 16, 2024

Could you please post screenshots (including all pertinent Panels) to illustrate the exact process and how which element is supposed to influence which other element/s? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 16, 2024 Jan 16, 2024

I wanted to change a specific color to the desired color by "hue saturation" in the adjustment layer, partially specified by a mask.
This is because the normal method of specifying colors increases the man-hours required for correction, as all changes are necessary when the base color is changed.

If shadow colors and bright areas can be controlled by "hue saturation" saturation and lightness values, there is a greater chance that there will be no problem even if the base color changes, and the rules can be easily used for other tasks.

By controlling with numerical values, rather than sensory values, the shadow color of this material should have a saturation and lightness of XX. If such rules can be systematized as a workflow, it will be easier to unify quality within the team.

However, in Photoshop, we did not know the rules for the change in HSB values due to changes in hue and saturation, and we did not know how to perform the calculations.

If only we knew the formula for calculating the change in HSB due to changes in saturation and lightness, we would be able to create a script or otherwise streamline the process.

Translated with www.DeepL.com/Translator (free version)

_0-1705412969115.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2024 Jan 16, 2024

The info panel can display colour values in Lab or other modes while the base document mode is RGB.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 16, 2024 Jan 16, 2024
quote

The info panel can display colour values in Lab or other modes while the base document mode is RGB.


By @Stephen Marsh

Good point. 

So a »brute force«-approach should be feasilbe (if slow) even if one uses a Hue/Saturation Layer. 

Set a Color Sampler in a meaningful area, make a change to the Adjustment Layer, read the Color Sampler, adjust and repeat. 

 

@木原雄大 , why don’t you simply use Solid Color Layers? 

Or is the screenshot unrelated to the actual files? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 17, 2024 Jan 17, 2024

The previous figure is different from the actual work.

For example, in the case of skin shadow color, there are often multiple layers of light and dark shadows, as well as light and highlights,

If everything is done with absolute color specification by solid coloring,
If the base skin color is changed even slightly, the shadow color and the color of the bright areas all need to be redesigned.

If the colors are controlled by "hue saturation" saturation and lightness, they are all controlled by relative values, so even if the base color is changed, the shadow colors and bright areas can be automatically replaced.

Assuming that corrections will occur, we want to formulate a workflow that is both accurate and lowers the cost of corrections.

Translated with www.DeepL.com/Translator (free version)

 

_0-1705496760688.png_1-1705497098373.png

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 17, 2024 Jan 17, 2024
LATEST

I think your proposed approach is problematic in principle. 

Adjusting Lightness in a Hue/Saturation Layer will affect white, too – do you actually want that? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines