@pbroom/color-kit/reactPlane geometry

UseChromaBandOptions

Options for useChromaBand.

interfaceimport type { UseChromaBandOptions } from '@pbroom/color-kit/react';use-chroma-band.ts:26
interface UseChromaBandOptions extends ColorPlaneQueryOptions {
  quality?: ColorPlaneQualityLevel;
  isDragging?: boolean;
  performanceProfile?: ColorPlanePerformanceProfile;
  mode?: ChromaBandMode;
  gamut?: GamutTarget;
  hue?: number;
  steps?: number;
  samplingMode?: 'uniform' | 'adaptive';
  adaptiveTolerance?: number;
  adaptiveMaxDepth?: number;
  pixelSize?: ColorPlanePixelSize;
}

Properties

quality?ColorPlaneQualityLeveldefault 'high'
Sampling detail. Pass useAdaptiveQuality's quality to coarsen sampling while frames are slow.
isDragging?booleandefault false
Whether the plane is being dragged. While true, queries run in a shared Web Worker (when available) and the last result stays in place until a fresh one arrives; at rest they run synchronously.
performanceProfile?ColorPlanePerformanceProfiledefault 'auto'
Profile forwarded to the worker's compute scheduler.
mode?ChromaBandModedefault 'clamped'
How the band follows the plane color's chroma across lightness: 'clamped' keeps that chroma where it is in gamut and clamps to the boundary elsewhere; 'proportional' keeps its fraction of the maximum in-gamut chroma at the color's lightness.
gamut?GamutTargetdefault 'srgb'
Gamut the band is kept inside.
hue?number
Hue of the band in degrees. Defaults to the plane color's hue.
steps?numberdefault 48
Band samples at high quality; lower quality levels scale this down (minimum 8).
samplingMode?'uniform' | 'adaptive'default 'uniform'
'uniform' samples evenly; 'adaptive' refines where the band bends.
adaptiveTolerance?number
Adaptive-sampling error tolerance; derived from pixelSize when omitted. Only used with samplingMode: 'adaptive'.
adaptiveMaxDepth?number
Adaptive-sampling maximum refinement depth; derived from pixelSize when omitted. Only used with samplingMode: 'adaptive'.
pixelSize?ColorPlanePixelSize
Plane size in device pixels, for the adaptive sampling defaults.