@pbroom/color-kit/driverColor input
getColorInputLabel
Returns the English accessible label for a channel input, e.g. 'OKLCH lightness', 'Red' or 'Opacity'.
import { getColorInputLabel } from '@pbroom/color-kit/driver';color-input.ts:380function getColorInputLabel<Model extends ColorInputModel>(
model: Model,
channel: ColorInputChannelFor<Model>,
): string;Parameters
- model
Model - channel
ColorInputChannelFor<Model>
Returns
string
Throws
- When
channeldoes not belong tomodel.
Example
import { getColorInputLabel } from '@pbroom/color-kit/driver';
getColorInputLabel('oklch', 'c'); // → 'OKLCH chroma'
getColorInputLabel('hsl', 's'); // → 'Saturation'