@pbroom/color-kit/interopTypes

ArraySpace

Channel layouts supported by the array interop helpers. Each name maps to a to<Space>Array / from<Space>Array function pair ('display-p3' to toP3Array / fromP3Array):

typeimport type { ArraySpace } from '@pbroom/color-kit/interop';types.ts:37
type ArraySpace =
  | 'linearSrgb'
  | 'srgb'
  | 'linearP3'
  | 'display-p3'
  | 'oklab'
  | 'oklch';
  • linearSrgb: linear-light sRGB [r, g, b] (three.js working space).
  • srgb: gamma-encoded sRGB [r, g, b] in 0–1 (not 0–255).
  • linearP3: linear-light Display P3 [r, g, b].
  • display-p3: gamma-encoded Display P3 [r, g, b] in 0–1.
  • oklab: [L, a, b].
  • oklch: [l, c, h] with hue in degrees.

Also exported from