Maths · function

srgbToLinear

One channel, 0 to 1, through the sRGB decode: the straight segment below 0.04045. For a colour that arrives as numbers per channel rather than as a triple, a packed hex token being the usual one; allocates nothing.

Explained in Coordinates and units.

function srgbToLinear(value: number): number
import { srgbToLinear } from '@driftengine/core';

Parameters

ParameterTypeDescription
valuenumber