sRGB - What Is It?

sRGB is the default color screen space developed by Microsoft and HP. It stores the color space for images that contain no color in each of the RGB channels, but does not display all of the colors discernible to the human eye, instead showing only those colors in the color-triangle shown below:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/ca661200-8c48-40be-84f6-edbad93bec0f/sRGBSPace.png

Note While this works for computer monitors, in other applications (e.g., printing in CMYK) using the expanded color spaces achieves higher fidelity in blues and greens (primarily). This does not apply to 3D art though.*

As shown below, a gradient may be color corrected to either be sRGB (top-half) or not sRGB (bottom-half). In sRGB space, the Gamma is approximately 2.2 units consisting of a linear section near black and a non-linear section near white (below; top image). The purpose of the linear section is so the curve does not have an infinite slope at zero, which could cause numerical problems.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/342a5787-76eb-4f59-9dbe-b28171d7e4d4/GammaSpace.png

It is often casually stated that the decoding gamma for sRGB data is 2.2, yet the transform (real) shows an exponent of 2.4. This is because the net effect of the piecewise decomposition is necessarily a changing instantaneous gamma at each point in the range: it goes from gamma = 1 at zero to a gamma of 2.4 at maximum intensity with a median value being close to 2.2. The transformation was designed to approximate a gamma of about 2.2, but with a linear portion near zero to avoid having an infinite slope at K = 0, which can cause numerical problems.

Basically, sRGB is used for maximizing the quality of a limited 8-bit image. It lifts the color values of the more important dark parts of the image before saving. Because our eyes are more sensitive to differences in darker colors than brighter colors, the darker parts get more room in the small 0-255 value space. When you open a sRGB file the values are lowered again to look like they did before you saved the file.

To summarize:

  1. Top-Half of the above image is in sRGB space;
  2. Bottom-Half of the above image is in Linear space
  3. Most render engines will utilize Linear space and convert images (textures) to sRGB unless told otherwise.

Why Should I Care?

You should care because the render engines care. If you choose the incorrect color space to use for a texture in your 3D engine, then your textures will be sampled incorrectly and result in abnormal appearances that you were not expecting.