@pbroom/color-kit/driverColor area
getColorAreaValueText
Human-readable aria-valuetext for both axes, x first, e.g. "Lightness 60%, Chroma 0.2". Lightness is shown as a percentage, hue in whole degrees, chroma to three decimals.
import { getColorAreaValueText } from '@pbroom/color-kit/driver';color-area.ts:846function getColorAreaValueText(
color: Color,
axes: ResolvedColorAreaAxes,
): string;Parameters
Returns
string
Example
import { getColorAreaValueText, resolveColorAreaAxes } from '@pbroom/color-kit/driver';
getColorAreaValueText({ l: 0.6, c: 0.1, h: 250, alpha: 1 }, resolveColorAreaAxes());
// → 'Lightness 60%, Chroma 0.1'