Skip to main content
Number 7
Participating Frequently
July 9, 2017
해결됨

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

  • July 9, 2017
  • 2 답변들
  • 16692 조회

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.

이 주제는 답변이 닫혔습니다.
최고의 답변: davescm

But you can't have 'half way between 127 and 128' represented in 8 bit integer. It has to be 127 or 128 and conventional rounding has been applied to use 128.

 

Dave

2 답변

Participant
August 9, 2023

If it is 0 - 255 then there are 256 numbers, so the true middle of that amount is 128. Since each value is different, starting at 0 or 1 does not make a difference. Taking the 0 - 255, it could be reimagined as 1 - 256 which may help to understand where I am going with this.

Participant
September 10, 2023

What you're describing would be "half" with respect to cardinality (i.e counting individual distinct items). But in this context, we're not so much counting as we are -measuring- along a continuous range (and then quantizing that range into a series of discrete portions). For a continuous range of memory divided into 256 sections numbered 0-255, the midpoint of the range is exactly where the end of the 127th section meets the start of the 128th section. It makes more sense to say that is exactly halfway between section 127 and 128, as opposed to saying its just 127, or just 128.

 

davescm
Community Expert
davescmCommunity Expert답변
Community Expert
September 10, 2023

But you can't have 'half way between 127 and 128' represented in 8 bit integer. It has to be 127 or 128 and conventional rounding has been applied to use 128.

 

Dave

davescm
Community Expert
Community Expert
July 9, 2017

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

Number 7
Number 7작성자
Participating Frequently
July 9, 2017

Got it .

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

Number 7
Number 7작성자
Participating Frequently
July 9, 2017

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.


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.