@pbroom/color-kit/hctHCT

maxHctChromaAtTone

Returns the maximum HCT chroma realizable at a given hue and tone.

functionimport { maxHctChromaAtTone } from '@pbroom/color-kit/hct';index.ts:87
function maxHctChromaAtTone(  hue: number, ,  tone: number,): number;

Asks Material HCT (default viewing conditions, sRGB rendering) for chroma 200 at that hue and tone and reports the chroma the solver actually realizes. Hue is wrapped to [0, 360), tone is clamped to [0, 100], and the result is never negative.

Parameters

huenumber
HCT hue in degrees.
tonenumber
HCT tone, 0-100.

Returns

numberMaximum realized HCT chroma.

Example

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

maxHctChromaAtTone(250, 50); // → ≈ 52.34

See also

Also exported from