Skip to main content

Function: linearTosRGB()

linearTosRGB(x): number

Convert a single linear channel value to sRGB-encoded. Input and output are in [0, 1]. Apply after any linear math; multiply by 255 for bytes if needed.

Parameters​

x​

number

Linear value in [0, 1]

Returns​

number

sRGB value in [0, 1]