4 ms·
What about giving colors in 16bpp in linear space instead? That covers way more displays and future ones, no?
by jfkebwjsbx 7y ago
What about giving colors in 16bpp in linear space instead?
That covers way more displays and future ones, no?
- VoxPelli 7y agoThat just describes how precise of a value between 0 and 100% for each Red, Green and Blue channel you can define, it doesn’t change what Red, Green and Blue a 100% actually represents. The color profile defines what your definition actually represents and translates your 0-100% value to an actual color on the display.
- jfkebwjsbx 7y agoWhat about 16-bit or 32-bit floats in linear space? They can go way below and above the [0, 1] range while maintaining a lot of precision in that important range.
- Asooka 7y agoNo, because this expands colours to ones that cannot be expressed with sRGB, no matter if it's encoded as 16bit linear, or with the sRGB transfer function. You cannot express a hue outside the Rec.709 triangle, no matter how much precision you add (1). Display-P3 uses points in CIE xyz space for its RGB channels that are farther apart than sRGB, allowing it to express more hues, which sRGB monitors and colours cannot. It's still not the full spectrum humans can see, but it's much better. (1) technically you can, if you allow channel values to be negative, but that breaks compositing.
- TazeTSchnitzel 7y ago> It's still not the full spectrum humans can see In case anyone wonders why colour spaces don't typically try to cover the full spectrum, there's two problems. One is that it may be difficult to reproduce consistently, but the other problem is that it's not a neat triangle, so to represent it completely as RGB you would have large regions of undefined space.
- klodolph 7y agoAnother issue is that as you increase the gamut, you decrease precision. So you sometimes see wide gamuts like scRGB only used with higher precision images.
- jfkebwjsbx 7y agoI don’t see that as a problem. The color would be undefined for humans, but they would still be colors. It would make sense to have them if only to be able to perform operations on them and retain quality (like working with HDR/raw images even if almost everybody will see them in sRGB).
- jfkebwjsbx 7y agoI should have said floats, yeah. GPUs shaders work in many cases with 32-bit floats per channel in linear space, right? I don’t see why browsers couldn’t support colors with that precision considering they may be rendering with the GPU anyway (perhaps with another profile, yes). Browsers could clamp them to sRGB on parsing for the moment and add proper functionality later.
- gardaani 7y agoThe latest CSS Color spec includes support for Lab colors in linear space. It covers all possible colors. The syntax supports decimal numbers, so you can have as much precision as you want (depending how much the browser supports internally): lab(75.12321% 30.4124 -12.32434353) In addition to supporting all colors, it also supports HDR (very bright pixels) by allowing the lightness to go above 100%. So, this is very bright red: lab(400% 80 70). Most design software (Photoshop, Affinity Designer..) can display colors as Lab values and those can be used in CSS. Since lab colors are not intuitive for humans, CSS also supports Lch (lightness, chroma, hue), which is more human friendly. Browser vendors are currently adding Lab support to their browsers. https://www.w3.org/TR/css-color-4/#lab-colors https://www.w3.org/TR/css-color-4/#lab-colors
- jfkebwjsbx 7y agoThanks a lot for this answer, very informative. I was not aware of Lab coming to browsers.