Gamma Encoding & Linearization

sRGB to Linear Color Space Converter: Restoring Neutral Color Profile

Convert non-linear sRGB values to linear color space using our advanced log conversion tool and image to log converter. Decompress sRGB gamma correction to restore a neutral color profile, enabling mathematically correct blending, color adjustments, and log encoding.

The Difference Between Linear Light and Gamma-Corrected Light

Linear light represents the raw, physical intensity of photons in a scene—if you double the light source, the linear pixel value doubles. Monitors cannot display linear light directly because human vision is non-linear (we are far more sensitive to subtle differences in dark tones than in bright highlights). Consequently, standard color profiles apply sRGB Gamma Correction (compressing highlights and expanding shadows). However, performing color math on gamma-corrected pixels results in ugly color shifts and halos. For accurate color science, we must first linearize the signals.

Mathematical Formulas: The sRGB Transfer Function

The sRGB piecewise linear-to-gamma transfer function uses a linear slope near black and a power function for mid-tones and highlights. To write a converter, we reverse these equations. If a normalized color channel value (Csrgb) is less than or equal to 0.04045, the linear value (Clinear) is computed as Csrgb / 12.92. If the value is higher, we compute it as ((Csrgb + 0.055) / 1.055)2.4. Applying this formula to all three channels strips the display profile, yielding linear RGB space.

Why Linear Color Space is Crucial for VFX and Color Science

In visual effects (VFX), 3D rendering, and professional color pipelines, linear color space is the absolute baseline. All physics calculations—including light diffusion, specular reflections, blur, and color overlays—assume light behaves linearly. Blending two layers in gamma space creates dark borders at the edges, whereas blending in linear space yields smooth, physically realistic gradients. Once linearized, we can convert values to target camera log coordinates (like Sony S-Log3) with absolute mathematical precision.