-1

I have a thought of making a color that bypasses the numerical color value of 255.

Now, if you didn't know, computer colors are created via hex codes, which its max is FF, the hex code of 255. How would we see a color that is made with hex codes that bypasses FF? It would surely look strange.

But how do we pass 255 if we want to make a color?

4
  • 5
    Aside from breaking so many fundamentals, there literally is no reason for doing this. The difference between RGB 255,0,0 and 254,0,0 is so small that a human eye can't even detect. Given that all an RGB code does is turn a lightpixel on from completely off to completely on in 256 steps, all you can do is increase the steps, not make it more bright.
    – LPChip
    Mar 12, 2021 at 10:36
  • You need 16-bit colors, so at least 48-bit pixels, mostly only used by specialized medical devices with specialized software.
    – harrymc
    Mar 12, 2021 at 11:12
  • 1
    This demonstrates a very flawed understanding as to how colour is displayed & transmitted. The numbers themselves are almost irrelevant if you don't specify your colour space. The ProPhoto space is already larger than any monitor can display, or any human eye can perceive.
    – Tetsujin
    Mar 12, 2021 at 11:13
  • The standard color values 0-255 are defined within a color model. If you want to reach colors outside of this color model (I assume this is what you are trying to do) you need to sue a different color model that covers a larger "color space". See for example youtube.com/watch?v=AzH1EG-few4
    – Robert
    Mar 12, 2021 at 11:13

2 Answers 2

0

How the "overflow" from FF/255 is handled depends entirely on the program.

Typically though, the data would follow a specific structure and trying to increase one part beyond what it is normally used for will end up modifying other data.

If you were able to somehow "push past" 0xFF then the next value would be 0x100. Either that 1 would somehow overwrite or increase the next byte along, or it would simply be dropped.

In the case of RGB ordered pixel data you could be mangling the green data as well, and at a minimum would simply be setting the red channel to 0x00.

You can find out more looking at Wikipedia Integer Overflow

This of course assumes an 8-bit colour range for each channel, 0x00-0xFF (decimal 0-255) . If you want to use a wider colour space then you need a program and file format that supports it. There are more programs that now support a 10-bit colour profile for images which could give a range of 0-1024, but the highest value still only represents "fully on" and only gives a much finer gradient between "off" and "on" in terms of colour.

All red 255 in an 8-bit colour space would, when converted, look the same as red 1023 in a 10-bit space. Conversely, the actual value 255 in a 10 bit colour space would look quite dark.

2
  • 2
    I know that's what was asked, but I very much doubt that's what was really intended. I'm reading it as "How can I set my colour to 11?", with about the same understanding of the subject as in Spinal Tap ;)
    – Tetsujin
    Mar 12, 2021 at 11:16
  • 1
    @Tetsujin I was just adding a paragraph at the end about "setting to 11" :)
    – Mokubai
    Mar 12, 2021 at 11:18
1

Pixel values over 255

There are image formats that use 2 bytes to represent value of each subpixel, that's values 0-65535 - but not for the reason you think. It doesn't make the max color brighter (65535 is exactly as bright as 255 was in 1-byte formats) but gives you more steps to work with.

In other words, 0 always means 0% brightness and max value (255 or 65535) always means 100% brightness. For max value of 255 the smallest color difference that can be represented is 0.39%, while for 65535 it's 0.0015%.

It doesn't make sense for images intended to be displayed as-is to use such precise color - human eye can't distinguish such subtle differences anyway - but it's useful for images intended for further processing. One example would be video game textures, which are affected by lighting etc. and with just 1-byte deep color channels processing could produce color banding.

Color gamut

Monitors dedicated for color sensitive work have wider color gamut, which means that they can produce a wider range of colors. On such screens the same color value of 255 (or 65535) looks more vivid than on a regular screen. If colors on an older/cheaper laptop screen look washed out compared to a newer/more expensive laptop, it's probably for the same reason: the more expensive one has wider gamut (although still not as wide as professional stuff), and usually worse contrast ratio too. 1366×768 screens were notorious for being relatively bad at this.

This could be what you had in mind when asking this question, except the input color values are the same. It's just that the max input value corresponds to a more vivid color, and the same increment in input values produces a more pronounced difference.

By the way, these professional monitors are too vivid to use them for normal stuff, like web browsing etc. - everything looks extremely vivid, especially the greens. They usually can be switched to a "regular" gamut to make the colors acceptable for non-color-sensitive work.

HDR

HDR stands for a bunch of different things in the digital work. Here I'm talking about "HDR displays", ie. displays that accept color deeper than 8 bits and offer higher-than-average peak brightness. Essentially displays that combine the two things described above.

Most such displays accept 10 bits of color per channel, resulting in a 0-1023 range. But if the display's peak brightness is very high, then 1023 doesn't correspond to the 100% of brightness that you're used to - it's more than that. If the image source (eg. computer) is aware of it, it can display "regular brightness" stuff without making use of the extra 2 bits of color (ie. maxing out at 255), but it can also use of the higher brightness in selected areas to achieve impressive dynamic range. So now when you're looking at the sun in a video game, the display will actually be blinding bright in that area, producing a more realistic effect.

You must log in to answer this question.