@pbroom/color-kit/reactPlane renderer
UseColorPlaneRendererOptions
Options for useColorPlaneRenderer.
import type { UseColorPlaneRendererOptions } from '@pbroom/color-kit/react';use-color-plane-renderer.ts:47interface UseColorPlaneRendererOptions {
source?: ColorPlaneSource;
displayGamut?: GamutTarget;
renderer?: ColorPlaneRenderer;
edgeBehavior?: ColorPlaneEdgeBehavior;
resolutionScale?: number;
quality?: ColorPlaneQualityLevel;
performanceProfile?: ColorPlanePerformanceProfile;
isDragging?: boolean;
}Properties
- source?
ColorPlaneSourcedefault'displayed' - Paint the gamut-mapped
displayedcolors or the rawrequestedcolors. - displayGamut?
GamutTarget - Gamut the displayed pixels are mapped into. Defaults to the active gamut of the nearest
<Color>provider, or'display-p3'without one. - renderer?
ColorPlaneRendererdefault'auto' - Rasterizer.
'auto'uses WebGL and falls back to the CPU renderer when WebGL is unavailable, fails to set up, or loses its context. - edgeBehavior?
ColorPlaneEdgeBehaviordefault'clamp' - Out-of-gamut behavior for displayed source pixels:
'clamp'maps them to the nearest in-gamut color,'transparent'leaves them transparent. - resolutionScale?
numberdefault1 - Extra backing-store scale factor beyond the device pixel ratio (non-positive or non-finite values count as 1). The effective scale, including the quality multiplier, is clamped to [0.35, 2.5].
- quality?
ColorPlaneQualityLeveldefault'high' - Detail level; lower levels render fewer pixels. Pass
useAdaptiveQuality'squalityto adapt it to frame cost. - performanceProfile?
ColorPlanePerformanceProfiledefault'auto' - Profile the resolution multiplier is read from.
- isDragging?
booleandefaultfalse - Whether the plane is being dragged; renders slightly fewer pixels while true.