toHct
Convert a Color to HCT (Material Design hue, chroma, tone).
import { toHct } from '@pbroom/color-kit';index.ts:245function toHct(color: Color): Hct;Computed from the sRGB value clipped to the gamut like toRgb but not rounded to 8-bit, under Material's default viewing conditions. Tone is CIE L* (0-100).
Parameters
Returns
Example
import { parse, toHct } from '@pbroom/color-kit';
toHct(parse('#3b82f6')); // → ≈ { h: 266.34, c: 64.16, t: 55.63, alpha: 1 }