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