9 Replies Latest reply on Sep 1, 2017 6:52 AM by rogerup_

# Why the 50% gray's RGB value is 128 instead of 127 in Photoshop?

As we know there is 256 levels of luminence in Photoshop, it's ! the number of 0-255 levels,

as my opinion, the 50% gray's value of RGB should be 127 as the middle gray.

But, the value of RGB is 128 when I use the " Editor-Fill-50% middle gray " to fill a layer in Photoshop.

• ###### 1. Re: Why the 50% gray's RGB value is 128 instead of 127 in Photoshop?

The mid point would actually be 255/2 = 127.5. But 8 bit does not have half values so rounded that is 128.  If you switch the info panel to 16 bit (which in Photoshop is actually 15 bit) you will see the value is 32768/2 = 16384

Dave

• ###### 2. Re: Why the 50% gray's RGB value is 128 instead of 127 in Photoshop?

Got it .

So, in other app like Adobe After Effects the 16 bit will also be 15 bit ?

• ###### 3. Re: Why the 50% gray's RGB value is 128 instead of 127 in Photoshop?

Its 8 bits and 16 bits you count all bit off state off it a binary thing 0 to 255 is 256  values 0 to 32767 is 32768 values  you start a 0 not 1.

• ###### 4. Re: Why the 50% gray's RGB value is 128 instead of 127 in Photoshop?

Hi JJ

Full 16 bit would be 65536 values (0-65535)  15 bit gives 32768 (0-32767). Photoshop actually manages 0-32768 = 15 bit +1. Just why they built it like that I am not sure.

Number 7 - Not sure on After Effects, I'll have a look later.

Dave

• ###### 5. Re: Why the 50% gray's RGB value is 128 instead of 127 in Photoshop?

What Chris Cox wrote about 16 bits/channel in photoshop.

• ###### 6. Re: Why the 50% gray's RGB value is 128 instead of 127 in Photoshop?

Thanks R_Kelly that is interesting reading. The integer middle value makes a lot of sense

Dave

• ###### 7. Re: Why the 50% gray's RGB value is 128 instead of 127 in Photoshop?

Even so, the 128th value of RGB should be 127, it's not the 50% gray's value (128) in Photoshop. So, Thank you anyway.

• ###### 8. Re: Why the 50% gray's RGB value is 128 instead of 127 in Photoshop?

Yes full 16 bit would be 65K values for red an green and blue 48bit.  RAW values are from Camera sensor and its a single value for each pixels and what 16bit means depends on how many bits the camera uses of the full 16 bit.    The range or values varies 10, 12, or 14 bit. These values are handled by software. How its done in software does not matter to me that much as long as I can do what I want to do with the application UI, features, plug-in and add-ons.    At my age I'm not  going to learn C and program a the bit level. I'll never understand Laplace transform, inverse Laplace transform, Why Laplace transform work and are useful for doing whatever. Then there are Z transform and Fourier Transform all are not for what is my left of my little brain? That path would be too long for me to learn all that is need to process images at the bit level my demise path  would be too big of an interruption to overcome.

• ###### 9. Re: Why the 50% gray's RGB value is 128 instead of 127 in Photoshop?

It depends on where you start. If you start from White (255) the 128h value of RGB is 128, not 127.