PlaneChromaBandQuery
Query for getPlaneChromaBand.
import type { PlaneChromaBandQuery } from '@pbroom/color-kit/plane';types.ts:347interface PlaneChromaBandQuery {
kind: 'chromaBand';
requestedChroma?: number;
gamut?: GamutTarget;
hue?: number;
mode?: ChromaBandMode;
steps?: number;
samplingMode?: 'uniform' | 'adaptive';
adaptiveTolerance?: number;
adaptiveMaxDepth?: number;
selectedLightness?: number;
maxChroma?: number;
tolerance?: number;
maxIterations?: number;
alpha?: number;
}Properties
- kind
'chromaBand' - requestedChroma?
number - Target OKLCH chroma. Defaults to the plane's fixed
c(0when unset). - gamut?
GamutTargetdefault'srgb' - Gamut that bounds the band.
- mode?
ChromaBandModedefault'clamped' 'clamped'usesrequestedChromawherever it fits and the gamut edge elsewhere;'proportional'keeps the requested/max-chroma ratio measured atselectedLightnessacross all lightness.- steps?
numberdefault12 - Number of equal lightness segments in
'uniform'mode; the result hassteps + 1points. Must be an integer of at least 2. - samplingMode?
'uniform' | 'adaptive'default'uniform' 'uniform'samples fixed lightness steps;'adaptive'reuses adaptive gamut-boundary sampling.- adaptiveTolerance?
numberdefault0.001 - Maximum perpendicular error in
(l, c)before an adaptive segment is split. - adaptiveMaxDepth?
numberdefault12 - Maximum recursion depth in
'adaptive'mode. - selectedLightness?
number - Lightness at which
'proportional'mode measures the chroma ratio. Defaults to the plane's fixedl(0.5for a default OKLCH plane). - maxChroma?
numberdefault0.4 - Upper bound of the maximum-chroma search.
- tolerance?
numberdefault0.0001 - Absolute chroma precision at which the maximum-chroma search stops.
- maxIterations?
numberdefault30 - Iteration cap for the maximum-chroma search.
- alpha?
number - Alpha of the sampled colors. Defaults to the plane's fixed
alpha.
Also exported from
@pbroom/color-kitthe same declaration, re-exported