@pbroom/color-kit/interopReaders
fromLinearP3Array
Read a color from linear-light Display P3 [r, g, b] stored in any array-like (number[], Float32Array, ...). Alpha is 1; use fromLinearP3Array4 to read [c0, c1, c2, alpha].
import { fromLinearP3Array } from '@pbroom/color-kit/interop';readers.ts:103function fromLinearP3Array(
array: ArrayLike<number>,
offset?: number,
): Color;Parameters
Returns
ColorA new Color (OKLCH).
Example
const color = fromLinearP3Array(buffer, 6);Also exported from
@pbroom/color-kitthe same declaration, re-exported