Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
sRGB info and articles #1014
Thumb rule: If humans receive a picture from aliens using linear color space, it will appear darker on our screens than we are used to. This might make us believe the aliens have dark skin. (It is because our screens are not linearly calibrated and image editors, scanners, cameras etc. compensate for it by storing brighter color values).
Tip: The term "gamma corrected" is used about non-linear color space, which can be confusing. The linear color space is "mathematically correct". "Gamma corrected" means changing color values to compensate for the non-linear calibration of computer monitors.
sRGB can be enabled for rendering, which means the GPU uses hardware to convert colors back to linear space in the shaders. If you try to display a picture with sRGB enabled, telling it is RGB, then it will appear brighter. When you pass a uniform color to a shader with sRGB enabled, the color is treated as linear color space. This makes the color turn brighter than expected because the color codes are often copied from an image editor (which uses sRGB).
The colors people are used to are usually in sRGB, so when they do math with it is often wrong.
This was referenced
Feb 18, 2016
Relevant OpenGL wiki section about sRGB: https://www.opengl.org/wiki/Image_Format#sRGB_colorspace