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
  • @pbroom/color-kit/compute
  • @pbroom/color-kit/hct
  • @pbroom/color-kit/driver
      • ffunctiongetColorDisplayHex
      • ffunctiongetColorDisplayStyles
      • ffunctioncolorsEqual
      • ffunctioncreateColorState
      • ffunctiongetActiveDisplayedColor
      • ffunctionmapDisplayedColors
      • ffunctionresolveColorSource
      • ffunctionresolveIncomingRequested
      • ffunctionsetColorActiveGamut
      • ffunctionsetColorActiveView
      • ffunctionsetColorChannel
      • ffunctionsetColorRequested
      • IinterfaceColorDisplayStyles
      • TtypeColorChannel
      • TtypeColorInteraction
      • TtypeColorSource
      • IinterfaceColorState
      • IinterfaceColorUpdateEvent
      • IinterfaceCreateColorStateOptions
      • TtypeGamutTarget
      • IinterfaceMapDisplayedColorsOptions
      • IinterfaceResolveIncomingRequestedOptions
      • IinterfaceSetColorRequestedOptions
      • TtypeViewModel
  • @pbroom/color-kit/react
Map

@pbroom/color-kit/driver/Color state

GamutTarget

Display gamut a color state renders in. The color-state, multi-color and display helpers validate it like the core plane queries: any other value, including the removed 'p3' spelling, throws a TypeError.

typeimport type { GamutTarget } from '@pbroom/color-kit/driver';color-state.ts:16
type GamutTarget = 'srgb' | 'display-p3';

Also exported from

  • @pbroom/color-kit/reactthe same declaration, re-exported

Your display: detecting

MIT licensedSource