fromLinearSrgbInto
Convert linear-light sRGB to a Color, writing into out (allocation-free). Inputs are not clamped.
import { fromLinearSrgbInto } from '@pbroom/color-kit';into.ts:119function fromLinearSrgbInto( out: Color, , linear: LinearRgb,): Color;Parameters
Returns
Colorout
Example
import { fromLinearSrgbInto, toHex } from '@pbroom/color-kit';
const color = { l: 0, c: 0, h: 0, alpha: 1 };
fromLinearSrgbInto(color, { r: 1, g: 0.2, b: 0, alpha: 1 });
toHex(color); // → '#ff7c00'