@pbroom/color-kit/hctHCT

maxHctPeakToneForHue

Convenience helper for the tone component of maxHctChromaForHue(...).

functionimport { maxHctPeakToneForHue } from '@pbroom/color-kit/hct';index.ts:268
function maxHctPeakToneForHue(
  hue: number,
  options?: MaxHctChromaForHueOptions,
): number;

Returns the fractional HCT tone (0-100) at which the maximum realized HCT chroma occurs for the provided hue.

Parameters

huenumber
HCT hue in degrees (wrapped).
options?MaxHctChromaForHueOptionsdefault {}
Method and LUT size, as for maxHctChromaForHue.

Returns

numberTone of the chroma peak, 0-100.

Throws

  • When options.method is not 'lut' or 'direct'.

Example

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

maxHctPeakToneForHue(250); // → ≈ 64.22

Also exported from