maxHctChromaForHue
Resolve the HCT hue peak: the maximum realized HCT chroma for a hue and the fractional tone where that peak occurs.
import { maxHctChromaForHue } from '@pbroom/color-kit/hct';index.ts:243function maxHctChromaForHue(
hue: number,
options?: MaxHctChromaForHueOptions,
): HctHuePeak;Uses Material HCT (default viewing conditions), which is based on an sRGB rendering pipeline and may quantize the result through the underlying solver. The default 'lut' method builds a 4096-entry table on first use and caches it; 'direct' searches tone per call.
Parameters
- hue
number - HCT hue in degrees (wrapped).
- options?
MaxHctChromaForHueOptionsdefault{} - Method and LUT size.
Returns
HctHuePeakThe peak chroma c and the tone t where it occurs.
Throws
- When
options.methodis not'lut'or'direct'.
Example
import { maxHctChromaForHue } from '@pbroom/color-kit/hct';
maxHctChromaForHue(250); // → { c: ≈ 61.71, t: ≈ 64.22 }See also
Also exported from
@pbroom/color-kitthe same declaration, re-exported