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