Gamma
The non-linear relationship between stored numerical values and displayed brightness in a colour space or on a device.
Formula / rule
Output = Input^γ
Measured in
γ exponent
In depth
Sensors record light linearly, but vision does not — we discriminate far better in the shadows than in the highlights. Encoding with a gamma of about 2.2 distributes the available levels the way the eye needs them, which is what allows an 8-bit file to look smooth. Every image file you view has been gamma-encoded.
Examples in practice
A linear raw file looks impossibly dark until the gamma encoding is applied, at which point midtones appear correct.