@pbroom/color-kit/reactPlane geometry
UseGamutBoundaryOptions
Options for useGamutBoundary.
import type { UseGamutBoundaryOptions } from '@pbroom/color-kit/react';use-gamut-boundary.ts:41interface UseGamutBoundaryOptions extends ColorPlaneQueryOptions {
quality?: ColorPlaneQualityLevel;
isDragging?: boolean;
performanceProfile?: ColorPlanePerformanceProfile;
gamut?: GamutTarget;
hue?: number;
steps?: number;
simplifyTolerance?: 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.
- gamut?
GamutTargetdefault'srgb' - Gamut whose boundary is traced.
- hue?
number - Hue of the boundary slice in degrees. Defaults to the plane color's hue.
- steps?
numberdefault48 - Boundary samples at
highquality; lower quality levels scale this down (minimum 8). - simplifyTolerance?
number - RDP simplification tolerance in (l, c) space; omit to disable.
- samplingMode?
'uniform' | 'adaptive'default'uniform' 'uniform'samples evenly;'adaptive'refines where the boundary 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.