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