chickadee » macaw » gamma-expand

gamma-expand nprocedure

Performs gamma expansion (decoding) of the real number n, converting from sRGB space to linear RGB space. This implements the sRGB reverse transfer function, which approximates a gamma of 2.2.

n is usually in the interval [0,1], and the result is usually in the interval [0,1]. To convert from an 8-bit sRGB component to a linear RGB component, do this: (gamma-expand (/ n 255.0))