@pbroom/color-kit/driverColor area
ColorAreaChromaBandOptions
Options for getColorAreaChromaBandPoints.
import type { ColorAreaChromaBandOptions } from '@pbroom/color-kit/driver';color-area.ts:198interface ColorAreaChromaBandOptions {
gamut?: GamutTarget;
mode?: ChromaBandMode;
steps?: number;
samplingMode?: 'uniform' | 'adaptive';
adaptiveTolerance?: number;
adaptiveMaxDepth?: number;
selectedLightness?: number;
maxChroma?: number;
tolerance?: number;
maxIterations?: number;
alpha?: number;
}Properties
- gamut?
GamutTargetdefault'srgb' - Gamut the band must stay inside.
- mode?
ChromaBandModedefault'clamped' 'clamped'keeps the reference chroma where the gamut allows it and clamps to the boundary elsewhere;'proportional'scales every step by the reference's requested/max chroma ratio atselectedLightness.- steps?
numberdefault12 - Equal lightness segments in uniform mode; the band has
steps + 1points. Ignored in adaptive mode. - samplingMode?
'uniform' | 'adaptive'default'uniform' 'uniform'samples fixed lightness steps;'adaptive'reuses adaptive boundary sampling.- adaptiveTolerance?
numberdefault0.001 - Adaptive mode: max perpendicular error in (l, c) before subdividing.
- adaptiveMaxDepth?
numberdefault12 - Adaptive mode: max recursion depth.
- selectedLightness?
numberdefaultthe reference color's `l - Lightness anchor for
'proportional'mode. - maxChroma?
number - Upper bound for the max-chroma search.
- tolerance?
number - Absolute precision of the max-chroma binary search.
- maxIterations?
number - Iteration cap for the max-chroma binary search.
- alpha?
numberdefaultthe reference color's `alpha - Alpha used while sampling.