Skip to main content

Function: sRGBToLinear()

sRGBToLinear(x): number

Convert a single sRGB-encoded channel value to linear light. Input and output are in [0, 1]. Normalize from bytes (e.g. byte/255) before calling.

Parameters​

x​

number

sRGB value in [0, 1]

Returns​

number

Linear value in [0, 1]