= Linear-light RGB
{c}
In <Linear-light RGB>, each component is proportional to the amount of its corresponding primary light. Adding or averaging components therefore corresponds to adding or averaging those light contributions, provided the same primaries and reference conditions are used. Nonlinear display encodings such as <sRGB> must first be decoded for this arithmetic.<CSS Color Module Level 4 by World Wide Web Consortium>[§§10.2–10.3, sRGB and srgb-linear]{ref}
For a nonnegative <sRGB> channel $c$ in $[0,1]$, the linear value is $c/12.92$ when $c\leq0.04045$, and $((c+0.055)/1.055)^{2.4}$ otherwise. Thus encoded mid-gray $c=0.5$ represents approximately0.214 linear light. Averaging encoded black and white gives0.5, while averaging their light gives0.5 linear, encoded as approximately0.735. This explains dark fringes produced by averaging nonlinear channel values directly. The primaries, white point and <transfer function>[transfer rule] together determine a <color space>; linearity alone does not specify which colors an RGB triple represents.
Back to article page