@pbroom/color-kitUtilities

ACHROMATIC_CHROMA_THRESHOLD

OKLCH chroma at or below which a color is achromatic and its hue is powerless: the CSS Color 4 OKLCH epsilon (OKLab_to_OKLCH in the spec's sample code uses chroma <= 0.000004). Every 8-bit and float gray converts with chroma around 1e-15, while the least chromatic non-gray 8-bit color has chroma around 0.001, so the cutoff separates the two with margin.

constimport { ACHROMATIC_CHROMA_THRESHOLD } from '@pbroom/color-kit';index.ts:111
const ACHROMATIC_CHROMA_THRESHOLD = 0.000004;

Used everywhere color-kit decides whether a hue means anything: OKLab → OKLCH conversion (achromatic results get h = 0) and every interpolation path (mix, interpolate, generateScale), where an achromatic endpoint takes the other endpoint's hue.