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

Formula for Levels adjustment (midpoint only)?

Participant ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

Before someone points me to it, YES, I’ve seen this thread https://community.adobe.com/t5/photoshop-ecosystem-discussions/question-on-the-gamma-mid-tone-value-...

 

But I can’t get it to work on MY numbers... I’m just trying to communicate to some folks who are coding a GUI for me where some colors are generated from one base color choice — and I’ve achieved what I want VISUALLY by using a levels adjustment layer and changing the midpoint fom 1 to 0.6, with these channel values and the results:

R 30 -> 48

G 46 -> 78

B 78 -> 123

 

I’ll be honest: I went to art school 34 years ago to AVOID math. Earlier, trying to see if a solution using the (mathmatically) much simpler Multiply blend mode would work, I was pushing my limits. So it’s possible that the above thread DOES solve my problem, but I’d like to be able to duplicate the results myself before suggesting that someone else use it.

 

Thanks in advance! In a little bit of a rush here,  

TOPICS
Actions and scripting

Views

571

Translate

Translate

Report

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

correct answers 1 Correct answer

People's Champ , Jun 07, 2022 Jun 07, 2022
quote
    • But — maybe I’m just not doing it right — ((48/255)^(1/0,6))*255 = 15.77 (not 30)
By @scabbot610

 

How did you get 30 out of 48? Show it in a screenshot analogous to mine.

 

aaa.jpg

Votes

Translate

Translate
Adobe
Guide ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

quote

I want VISUALLY by using a levels adjustment layer and changing the midpoint fom 1 to 0.6, with these channel values and the results:

R 30 -> 48

G 46 -> 78

B 78 -> 123

 

By @scabbot610

 

I didn't quite understand what that means. If you reduce the gamma (midpoint), then the values in the channels should also decrease.

 

Can you describe the desired result in more detail, or illustrate it with a screenshot?

Votes

Translate

Translate

Report

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
Participant ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

Ah, the Gamma Guru! I’m sorry I couldn’t understand your answer at the other thread correctly.

 

I don’t think it will take a screenshot, just maybe a shorter description, because the visual really won’t demonstrate anything I can’t describe. But let me try a list:

 

  • 1) I have someone else creating some code that has to, among lots of other things, make a color adjustment to a color that was chosen by a user
  •  2) That adjustment has to be made on-the-fly ouside of Photoshop
  • 3) In Photoshop, I’ve achieved the color shift that I want, simply by changing the gamma to 0.6
  • 4) In order to tell the coders what I want to happen, I have to to describe the mathematical operation the code will need to run. I don’t want to just send them an example and say “make it like this, but for every possible color.”
  • 5) Which is why I’m looking for an algorithmic solution.
  • 6) Unfortunately, when I do the math that I think is being shown on the other thread, I get numbers that are nothing like the ones that I’m actually getting in Photoshop. For example:
    • Using RGB values 48/74/123 and
    • Applying a gamma shift to 0.6
    • The resulting PS values are 30/46/78. 
    • But — maybe I’m just not doing it right — ((48/255)^(1/0,6))*255 = 15.77 (not 30)

Does that make more sense? Sorry for using a bulleted list plus numbers BUT the formatting for a numbered list doesn’t indent at all (at least not in my browser).

 

Thanks again!

Votes

Translate

Translate

Report

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
Participant ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

(seriously, I can’t edit or delete my own post? What the heck?)

Obviously, I mistakenly reversed the order of the pre- and post- gamma change numbers, they DID reduce as illustrated in my most recent example!

Votes

Translate

Translate

Report

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
Guide ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

2022-06-08_01-23-36.png

* didn't see similar @r-bin post because before posting was trying to figure out if the values were affected by the color space tone correction curve and the screen proof settings. No, they don't.

 

Are you using a single color fill document or an image with multiple colors? Could it be that near of the place where you measure the color there are shades of a different brightness and at the same time in the eyedropper settings you have a large sample size (i.e. it captures not a specific measurement point, but neighboring pixels)?

2022-06-08_01-46-13.png

Votes

Translate

Translate

Report

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
People's Champ ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

quote
    • But — maybe I’m just not doing it right — ((48/255)^(1/0,6))*255 = 15.77 (not 30)
By @scabbot610

 

How did you get 30 out of 48? Show it in a screenshot analogous to mine.

 

aaa.jpg

Votes

Translate

Translate

Report

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
Participant ,
Jun 07, 2022 Jun 07, 2022

Copy link to clipboard

Copied

LATEST

AHHHH SO SORRY for wasting your time... there was a color fill layer set to Overlay ABOVE it. 

Thanks for your patience and all of your hard work. I can’t believe I missed that.  😞

 

(...of course now it will probably take more than a levels adjustment to get what I want, lol)

Votes

Translate

Translate

Report

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