@pbroom/color-kit/planeMapping

usesLightnessAndChroma

Returns whether a plane is an OKLCH lightness × chroma plane (axes l/c in either order).

functionimport { usesLightnessAndChroma } from '@pbroom/color-kit/plane';mapping.ts:185
function 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

Returns

booleantrue for an OKLCH plane with axes l/c or c/l; otherwise false.

Example

TypeScript
import { definePlane, usesLightnessAndChroma } from '@pbroom/color-kit/plane';

usesLightnessAndChroma(definePlane({ fixed: { h: 264 } })); // → true
usesLightnessAndChroma(
  definePlane({ x: { channel: 'h' }, y: { channel: 'c' } }),
); // → false

Also exported from