Don’t Convert SRGB U8 to Linear U8
blog.demofox.org
blog.demofox.org
If we interpolate between one RGB color to another color of equal intensity, the intensity along the interpolation will not be constant.
LAB isn't perfect either. Depending on your endpoints it can transition through colors that are hardly related.
In [16]: math.log2(1./colour.models.oetf_reverse_sRGB(1.0/256.0))
Out[16]: 11.6915341649192
In [17]: math.log2(1./((1.0/256.0)**2.2))
Out[17]: 17.6
In [18]: math.log2(1./((1.0/256.0)**1.8))
Out[18]: 14.4
Although the stuff you will be losing even if you use 2.2 gamma with 12 bit depth should be fairly minimal if I'm interpreting the numbers correctlyThe area inside the "RGB" color triangle is represented by positive (non-negative) values. The sRGB color triangle only covers some part of the colors that physically can exist. If you have colors outside the sRGB color triangle at least one component will turn negative.
Not all colors you could represent by RGB-values do actually exist. You can even define a bigger color triangle covering all colors that exist with positive values but also some colors that don't exist.
It doesn't physically make sense but it is a very useful tool when doing calculations. By using floating point of sufficient precision you have to worry less about how you calculate your things. It's not needed but useful. If you know your calculations well you probably don't need float.
Here is an image of some color triangles and what area they cover: https://en.wikipedia.org/wiki/Color_space#/media/File:CIE193...
I don't know if gamma was a happy accident or a result of clever engineering, but it has a benefit even today. The eye's response to light is not linear, and a gamma-corrected signal has nearly even steps of brightness between each of the 256 levels. A linear signal does not, and would require more bits for an acceptable display.
If you want to be efficient with your encoding, you'll always use a gamma-like function. This is because our eyes have a logarithmic response to brightness, and the gamma is essentially an inverse of that.
Regardless of it being older, why isn't it way smarter?
Follow up question, why are you so snarky?