@pbroom/color-kit/planeMapping
usesLightnessAndChroma
Returns whether a plane is an OKLCH lightness × chroma plane (axes l/c in either order).
import { usesLightnessAndChroma } from '@pbroom/color-kit/plane';mapping.ts:185function usesLightnessAndChroma( resolvedPlane: Plane,): boolean;The gamut-boundary, contrast and chroma-band queries only produce geometry on such planes; on any other plane they return empty point/path lists.
Parameters
- resolvedPlane
Plane - Plane from
definePlane.
Returns
booleantrue for an OKLCH plane with axes l/c or c/l; otherwise false.
Example
import { definePlane, usesLightnessAndChroma } from '@pbroom/color-kit/plane';
usesLightnessAndChroma(definePlane({ fixed: { h: 264 } })); // → true
usesLightnessAndChroma(
definePlane({ x: { channel: 'h' }, y: { channel: 'c' } }),
); // → falseAlso exported from
@pbroom/color-kitthe same declaration, re-exported