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
      • ffunctioncreateDefaultFrameScheduler
      • ffunctioncreatePointerDragController
      • KconstDEFAULT_DRAG_EPSILON
      • KconstDEFAULT_MAX_UPDATE_HZ
      • ffunctionresolveDragEpsilon
      • ffunctionresolveMaxUpdateHz
      • IinterfaceDragCommitInfo
      • IinterfaceDragFrameScheduler
      • IinterfaceDragPoint
      • IinterfacePointerDragController
      • IinterfacePointerDragControllerConfig
  • @pbroom/color-kit/react
Map

@pbroom/color-kit/driver/Drag controller

DragPoint

A normalized drag position, typically [0, 1] on each axis.

interfaceimport type { DragPoint } from '@pbroom/color-kit/driver';drag-controller.ts:17
interface DragPoint {
  x: number;
  y: number;
}

Properties

xnumber
Normalized x.
ynumber
Normalized y.

Your display: detecting

MIT licensedSource