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

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

Explorer ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

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.

Views

15.1K

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 2 Correct answers

Community Expert , Jul 09, 2017 Jul 09, 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

Votes

Translate

Translate
Community Expert , Sep 10, 2023 Sep 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

Votes

Translate

Translate
Adobe
Community Expert ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

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

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
Explorer ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

Got it .

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

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
Community Expert ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

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.

JJMack

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
Community Expert ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

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

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
Community Expert ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

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

Does Photoshop CC support true 16-bit color editing?

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
Community Expert ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

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

Dave

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
Community Expert ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

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.

JJMack

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
Explorer ,
Jul 09, 2017 Jul 09, 2017

Copy link to clipboard

Copied

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.

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
New Here ,
Sep 01, 2017 Sep 01, 2017

Copy link to clipboard

Copied

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

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
New Here ,
Aug 12, 2022 Aug 12, 2022

Copy link to clipboard

Copied

So nobody cares about the 0 anymore? Yes the maximum value you can enter is 255, but the 0 is still the first value you can enter. So what you could do is take (255 + 1) / 2 -1 which gives you 127 as a middle value. However since 256 is an even number of possible values, 127 and 128 is still as much "middle" as each other, it just makes more sense to count upp to halfway in my mind. To get true middle you would need 127.5 or a different amount of maximum values that is an odd number. Like 0 - 10, that is 11 possible values when you include the 0. (0, 1, 2, 3, 4) [middle 5] (6, 7, 8, 9, 10), so 5 is truly middle with 5 possible answers on each side of it. 

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
Community Expert ,
Aug 12, 2022 Aug 12, 2022

Copy link to clipboard

Copied

'To get true middle you would need 127.5'

That's exactly what was said 5 years ago.

As there are no half's in 8 bit integer the value of 127.5 is rounded to 128. Normal mathematical rounding rounds down 0-0.4 and rounds up 0.5 to 0.9.

 

Dave

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
New Here ,
Aug 09, 2023 Aug 09, 2023

Copy link to clipboard

Copied

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.

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
New Here ,
Sep 09, 2023 Sep 09, 2023

Copy link to clipboard

Copied

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.

 

rangepic.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
Community Expert ,
Sep 10, 2023 Sep 10, 2023

Copy link to clipboard

Copied

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

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
New Here ,
Sep 10, 2023 Sep 10, 2023

Copy link to clipboard

Copied

Yes, I wasn't trying to suggest otherwise, Dave. I was only atttempting to illustrate to user Ethan31571945r33i  why 127.5 was previously called the true midpoint of the range being discussed.

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
Community Expert ,
Sep 10, 2023 Sep 10, 2023

Copy link to clipboard

Copied

Ah - got you, thanks for clarifying.

Dave

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
New Here ,
Dec 16, 2023 Dec 16, 2023

Copy link to clipboard

Copied

LATEST

I totally agree with you, and it's a dilemma that I was researching for weeks trying to even relate it to nanometers of wavelength without success because I was still taking into account what I call the "injective ratio bias", which made me think that rounding with 127 and 128 it was just as inaccurate due to a supposed fraction of the 0.5 decimal, but you're the only one who made it clear to me due to a very small detail that implies a crucial difference at all, and that's between countable and cardinal numbers from 0 to 1 there is a tellable and quantifiable unit that exempts you from counting it as an internal 0.5 but as an integer, this happens, in fact, because in the chomatic RGB system that 0 is another Hex Code and specific floating point in the Cartesian coordinate space, whose existence It has an exact angle between 360° of the complete spectral chromatic circle, that is, the 0 red exists as a distinguishable unit that tells us that together with a 255 Green and 0 blue the Hex code is #00FF00, being a maximum pure green, however, a Hex of 0,254,0 would be equivalent to 00FE00 and a 1,255,0 is 01FF00, therefore they're different colors, which effectively results in 256 units whose intermediate value is 128, being a synonym for the same accounting units 1 - 256, 2 - 257, 3 - 258 etc. In Synthesis, to avoid the obvious confusion of this accounting proportion bias, it would be necessary to dent the RGB accepted values, the lowest and highest integer limit being the range 1 - 256, and the 8-bit format would be preserved as well in words of the Bard AI. Even though that 0 represents a point of non-intensity or internal nullity of intervention of another RGB color, it's still another chromatic code, synonym of 255 color peak, just as 0° is "enharmonic" with 360° in the Unit Circle 😉 so, thank you for your insightful insight Ethan, I hope others can understand it too, Thanks for reading :sparkles:️

 

- Derek

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