@pbroom/color-kit/planeTypes

PlaneChromaBandQuery

Query for getPlaneChromaBand.

interfaceimport type { PlaneChromaBandQuery } from '@pbroom/color-kit/plane';types.ts:347
interface 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 (0 when unset).
gamut?GamutTargetdefault 'srgb'
Gamut that bounds the band.
hue?number
OKLCH hue in degrees. Defaults to the plane's hue (see planeHue).
mode?ChromaBandModedefault 'clamped'
'clamped' uses requestedChroma wherever it fits and the gamut edge elsewhere; 'proportional' keeps the requested/max-chroma ratio measured at selectedLightness across all lightness.
steps?numberdefault 12
Number of equal lightness segments in 'uniform' mode; the result has steps + 1 points. 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?numberdefault 0.001
Maximum perpendicular error in (l, c) before an adaptive segment is split.
adaptiveMaxDepth?numberdefault 12
Maximum recursion depth in 'adaptive' mode.
selectedLightness?number
Lightness at which 'proportional' mode measures the chroma ratio. Defaults to the plane's fixed l (0.5 for a default OKLCH plane).
maxChroma?numberdefault 0.4
Upper bound of the maximum-chroma search.
tolerance?numberdefault 0.0001
Absolute chroma precision at which the maximum-chroma search stops.
maxIterations?numberdefault 30
Iteration cap for the maximum-chroma search.
alpha?number
Alpha of the sampled colors. Defaults to the plane's fixed alpha.

Also exported from