@pbroom/color-kit/planeModels

planeModelChannels

Returns the channels a plane model accepts on its axes and in fixed.

functionimport { planeModelChannels } from '@pbroom/color-kit/plane';model-specs.ts:435
function planeModelChannels(  model: PlaneModel,): readonly PlaneChannel[];

Same data as PLANE_MODEL_CHANNELS, for models chosen at runtime.

Parameters

modelPlaneModel
Plane model to inspect.

Returns

readonly PlaneChannel[]The model's channel list, in model order (shared, do not mutate).

Throws

  • When model is not a supported plane model.

Example

TypeScript
import { planeModelChannels } from '@pbroom/color-kit/plane';

planeModelChannels('oklab'); // → ['L', 'a', 'b']
planeModelChannels('hct'); // → ['h', 'c', 't']

Also exported from