@pbroom/color-kit/hctHCT

maxHctChromaForHue

Resolve the HCT hue peak: the maximum realized HCT chroma for a hue and the fractional tone where that peak occurs.

functionimport { maxHctChromaForHue } from '@pbroom/color-kit/hct';index.ts:243
function 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

huenumber
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.method is not 'lut' or 'direct'.

Example

TypeScript
import { maxHctChromaForHue } from '@pbroom/color-kit/hct';

maxHctChromaForHue(250); // → { c: ≈ 61.71, t: ≈ 64.22 }

See also

Also exported from