@pbroom/color-kitGamut

MaxChromaAtOptions

Options for maxChromaAt; also accepted by gamutBoundaryPath and chromaBand.

interfaceimport type { MaxChromaAtOptions } from '@pbroom/color-kit';types.ts:35
interface MaxChromaAtOptions {
  gamut?: GamutTarget;
  tolerance?: number;
  maxIterations?: number;
  maxChroma?: number;
  alpha?: number;
}

Properties

gamut?GamutTargetdefault 'srgb'
Target gamut.
tolerance?numberdefault 0.0001
Width of the bisection interval at which the search stops; the result can be up to this much below the true boundary chroma. Lower values increase precision and work per call. Non-positive values use the default.
maxIterations?numberdefault 30
Hard cap on bisection iterations. Non-finite or non-positive values use the default.
maxChroma?numberdefault 0.4
Upper chroma search bound. If a color at this chroma is already in gamut, it is returned as is, so this also acts as a chroma cap.
alpha?numberdefault 1
Alpha channel used while sampling.