@pbroom/color-kit/driverColor area

ColorAreaChromaBandOptions

Options for getColorAreaChromaBandPoints.

interfaceimport type { ColorAreaChromaBandOptions } from '@pbroom/color-kit/driver';color-area.ts:198
interface 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 at selectedLightness.
steps?numberdefault 12
Equal lightness segments in uniform mode; the band has steps + 1 points. Ignored in adaptive mode.
samplingMode?'uniform' | 'adaptive'default 'uniform'
'uniform' samples fixed lightness steps; 'adaptive' reuses adaptive boundary sampling.
adaptiveTolerance?numberdefault 0.001
Adaptive mode: max perpendicular error in (l, c) before subdividing.
adaptiveMaxDepth?numberdefault 12
Adaptive mode: max recursion depth.
selectedLightness?numberdefault the 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?numberdefault the reference color's `alpha
Alpha used while sampling.