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
      • KconstCOLOR_SLIDER_DEFAULT_RANGES
      • ffunctioncolorFromColorSliderKey
      • ffunctioncolorFromColorSliderPosition
      • ffunctiongetColorSliderLabel
      • ffunctiongetColorSliderValueText
      • ffunctiongetColorSliderNormFromValue
      • ffunctiongetColorSliderThumbPosition
      • ffunctionnormalizeColorSliderPointer
      • ffunctionresolveColorSliderRange
      • ffunctionresolveColorSliderWrap
      • TtypeColorSliderChannel
      • TtypeColorSliderKey
      • IinterfaceColorSliderKeyOptions
      • TtypeColorSliderOrientation
  • @pbroom/color-kit/react
Map

@pbroom/color-kit/driver/Color slider

ColorSliderKeyOptions

Options for colorFromColorSliderKey.

interfaceimport type { ColorSliderKeyOptions } from '@pbroom/color-kit/driver';color-slider.ts:32
interface ColorSliderKeyOptions {
  largeStepRatio?: number;
  wrap?: boolean;
}

Properties

largeStepRatio?numberdefault 0.1
PageUp/PageDown step as a ratio of the range.
wrap?booleandefault true for the hue channel, false otherwise
Wrap around the range ends instead of clamping.

Your display: detecting

MIT licensedSource