linearP3ToLinearSrgbInto
Convert linear Display P3 to linear sRGB, writing into out (allocation-free). out may be the same object as p3.
import { linearP3ToLinearSrgbInto } from '@pbroom/color-kit';p3.ts:86function linearP3ToLinearSrgbInto( out: LinearRgb, , p3: P3,): LinearRgb;Parameters
Returns
LinearRgbout
Example
import { linearP3ToLinearSrgbInto } from '@pbroom/color-kit';
const linear = { r: 0, g: 0, b: 0, alpha: 1 };
linearP3ToLinearSrgbInto(linear, { r: 1, g: 0, b: 0, alpha: 1 });
linear.r; // → ≈ 1.2249 (outside sRGB)