home/ atoms/ srgb-tone-response-curve

The sRGB TRC is piecewise: linear near black, then a power curve with exponent 2.4

The sRGB TRC is not a simple gamma-2.2 power function. It has two segments: a linear portion (encoded/12.92) for encoded values below 0.04045, and a power function ((encoded+0.055)/1.055)^2.4 above that threshold. The linear toe avoids infinite slope at zero. The design was chosen to match CRT display response curves of the 1990s. Using the common approximation pow(x, 2.2) introduces a small error in dark tones. For precision work, the full piecewise formula should be used.

Examples

Precise linearization in GLSL: if (x <= 0.04045) x/12.92; else pow((x+0.055)/1.055, 2.4). pow(0.5, 2.2) ≈ 0.2170 vs. exact formula ≈ 0.2140.

Assessment

Write the sRGB TRC formula for converting encoded value 0.5 to linear intensity. Then state why using pow(0.5, 2.2) gives a slightly wrong answer.

“in the range of 0 to 0.04045 it actually is a linear segment: (intensity value) = (encoded value)/12.92”
corpus · color-spaces-bartosz-ciechanowski-interactive-article · chunk 14