# x% gray in digital

Discussion in 'Digital Photography' started by Roy G, Jan 16, 2007.

1. ### Roy GGuest

Eh ????

Roy G

Roy G, Jan 16, 2007

2. ### Steven WoodyGuest

what's the pixel value ( from 0 to 255 ) representing a x% gray ? where
x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or 1.8 ).

thanks.

-
woody

Steven Woody, Jan 16, 2007

3. ### aclGuest

Hi. If the blackpoint is set to 0, then I suppose it will fall at
255*(x/100)^gamma

acl, Jan 16, 2007
4. ### aclGuest

I should have added that I assumed x% gray to mean "would fall at
2.55*x or gamma=1 (linear mapping)". I have no clue if this is what it
is supposed to mean photographically (eg maybe it already is defined
using some sort of logarithmic scale etc; I have no clue, as I said).

I suspect that was your question too.

acl, Jan 16, 2007
5. ### Mike RussellGuest

There are a number of valid ways to answer your question. Here's a simple
one: taking RGB(255,255,255) as 100 percent, for gamma 2.2, the percentages
map to RGB values like this:

00 RGB(0.0,0.0,0.0)
10 RGB(88.0,88.0,88.0)
20 RGB(123.0,123.0,123.0)
30 RGB(148.0,148.0,148.0)
40 RGB(169.0,169.0,169.0)
50 RGB(187.0,187.0,187.0)
60 RGB(203.0,203.0,203.0)
70 RGB(217.0,217.0,217.0)
80 RGB(231.0,231.0,231.0)
90 RGB(243.0,243.0,243.0)
100 RGB(255.0,255.0,255.0)

These numbers were calculated in Photoshop by converting a gamma 1.0
gradient to sRGB, posterizing to 11 steps, and outputting the numbers as
text from the Curvemeister plugin.

Mike Russell, Jan 16, 2007
6. ### aclGuest

oops, typo: should have been
255*(x/100)^(1/gamma)
as it is meant to compensate for the nonlinearity. Maybe someone can
tell me if this is correct, or if x% gray means something else than
what I think? Thanks.

acl, Jan 16, 2007
7. ### Steven WoodyGuest

the data seem close to the formula acl provided.

Steven Woody, Jan 16, 2007
8. ### David J TaylorGuest

Looks good to me. 18% grey is about mid-scale.

David

David J Taylor, Jan 16, 2007
9. ### Gisle HannemyrGuest

For 18 % grey (i.e Zone V), and gamma 2.2, the answer is (126,126,126).

For pixel values for the other zones - and some background, please
see: http://hannemyr.com/photo/zonesystem.html

Gisle Hannemyr, Jan 22, 2007
10. ### Steven WoodyGuest

Steven Woody, Jan 26, 2007