Skip to content
color-kitnext
StartAPI
color-kit on GitHub
Start

Concepts

  • OKLCH-canonical
  • Requested vs displayed
  • Planes and queries
  • Gamut and tolerance
  • Contrast

Guides

  • Headless picker
  • React
  • Contrast-aware palettes
  • GPU and three.js
  • Performance

API

  • Overview
  • @pbroom/color-kit
  • @pbroom/color-kit/plane
  • @pbroom/color-kit/interop
      • TtypeColorTuple
      • TtypeColorTuple4
      • TtypeArraySpace
      • IinterfaceArrayWriteOptions
      • IinterfacePackColorsOptions
      • IinterfaceUnpackColorsOptions
      • IinterfaceWritableArrayLike
  • @pbroom/color-kit/compute
  • @pbroom/color-kit/hct
  • @pbroom/color-kit/driver
  • @pbroom/color-kit/react
Map

@pbroom/color-kit/interop/Types

WritableArrayLike

Any indexable, writable numeric array: a number[], a ColorTuple, or a typed array such as Float32Array / Float64Array.

interfaceimport type { WritableArrayLike } from '@pbroom/color-kit/interop';types.ts:20
interface WritableArrayLike {
  readonly length: number;
  [index: number]: number;
}

Properties

lengthnumberreadonly
[index: number]number

Also exported from

  • @pbroom/color-kitthe same declaration, re-exported

Your display: detecting

MIT licensedSource