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