ContrastPrecision
Channel precision for contrast metrics.
import type { ContrastPrecision } from '@pbroom/color-kit';metrics.ts:25type ContrastPrecision = 'exact' | '8bit';'exact'(default): unrounded channel values, so the result is a continuous function of the color (and agrees with colorjs.io for in-gamut colors).'8bit': quantize the gamma-encoded channels to 8 bits first, the way hex-based tools (WebAIM, browser devtools) measure. For the sRGB gamut this reproduces color-kit 0.1 results bit for bit.