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