Skip to main content
Participant
October 29, 2024
Question

mathematical formula for calculating gray points on a tuning curve

  • October 29, 2024
  • 1 reply
  • 489 views

Hi all,

I like to use the average color method for white balance, I find that the color values ​​on the three RGB channels of the curve are not the same as the color values ​​on the average color layer.
For example:
On the color layer, use as the average color has the value:
R: 192
G: 160
B: 133

But on the curve, the points on the RGB channel are:
R: 164 -> 127
G: 122 -> 127
B: 92 -> 127

Does anyone here know the formula for calculating the color values ​​of points R164, G122, B92 like that, if possible, please guide and give an example, I will be very grateful.

This topic has been closed for replies.

1 reply

Stephen Marsh
Community Expert
Community Expert
October 29, 2024

The RGB composite curve uses luminosity values, as do the layer blend if sliders.

 

If you fill a colour layer with white, gray, or black and fade or blend it to colour mode, you get the luminosity component.

 

If you were channel mixing, then: 30r 59g 11b (close enough).

Participant
October 29, 2024

@Stephen Marsh  Can you be more?

 

I looked at the numbers and found that some images can be calculated like this, but others can't. I think there might be a different formula.

I need to get the R - G - B values ​​on the Curve like photoshop does when using the grayscale eyedropper tool to put into the auto script.

D Fosse
Community Expert
Community Expert
October 29, 2024

The grayscale color picker refers to your working gray, by default Dot Gain 15 or 20%, which does not have the same tone response curve as any standard RGB color space. So the numbers won't match.

 

Matching pairs that have the same tone curve and therefore will give consistent numbers:

sRGB / Display P3 <> sGray

Adobe RGB <> Gray Gamma 2.2

ProPhoto <> Gray Gamma 1.8

 

The dot gain profiles are generic profiles for grayscale (K-only) offset printing (dot gain refers to ink spread in the paper). They are outdated by now and aren't really relevant for anything. Today you'll use the K component in the appropriate CMYK profile.

 

In addition, as Stephen points out, blend modes use the Luminosity formula (30/59/11 or around that).