@pbroom/color-kit/reactPlane geometry
UseChromaBandOptions
Options for useChromaBand.
import type { UseChromaBandOptions } from '@pbroom/color-kit/react';use-chroma-band.ts:26interface 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'squalityto coarsen sampling while frames are slow. - isDragging?
booleandefaultfalse - 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?
numberdefault48 - Band samples at
highquality; 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
pixelSizewhen omitted. Only used withsamplingMode: 'adaptive'. - adaptiveMaxDepth?
number - Adaptive-sampling maximum refinement depth; derived from
pixelSizewhen omitted. Only used withsamplingMode: 'adaptive'. - pixelSize?
ColorPlanePixelSize - Plane size in device pixels, for the adaptive sampling defaults.