@pbroom/color-kitUtilities

isAchromatic

True when an OKLCH chroma is at or below ACHROMATIC_CHROMA_THRESHOLD (or is NaN), i.e. the hue is powerless.

functionimport { isAchromatic } from '@pbroom/color-kit';index.ts:129
function isAchromatic(  chroma: number,): boolean;

Parameters

chromanumber
OKLCH chroma

Returns

booleanWhether the color is achromatic

Example

TypeScript
import { isAchromatic, parse } from '@pbroom/color-kit';

isAchromatic(parse('#808080').c); // → true
isAchromatic(parse('#3b82f6').c); // → false