fromHct
Convert HCT (Material Design hue, chroma, tone) to a Color.
import { fromHct } from '@pbroom/color-kit';index.ts:267function fromHct(hct: Hct): Color;Uses Material's Hct.from() solver, which reduces chroma to fit sRGB at the requested hue and tone and yields an 8-bit sRGB color, so the result is always in the sRGB gamut and quantized to 8-bit.
Parameters
Returns
Example
import { fromHct, toHex } from '@pbroom/color-kit';
toHex(fromHct({ h: 280, c: 40, t: 60, alpha: 1 })); // → '#838cd0'