Decodes an sRGB ColorRGB into out as linear-light, and returns out.
out
const linear: ColorRGB = [0, 0, 0];srgbToLinearRGB(parseColorRGB("#ffcc00"), linear); Copy
const linear: ColorRGB = [0, 0, 0];srgbToLinearRGB(parseColorRGB("#ffcc00"), linear);
source and out may be the same array (in-place conversion). Allocates nothing.
source
Decodes an sRGB ColorRGB into
outas linear-light, and returnsout.sourceandoutmay be the same array (in-place conversion). Allocates nothing.