@pbroom/color-kit/driverColor input
getColorInputChannelGlyph
Returns the one-character glyph for a channel input's leading scrub handle: the uppercase channel letter, or 'α' for alpha.
import { getColorInputChannelGlyph } from '@pbroom/color-kit/driver';color-input.ts:423function getColorInputChannelGlyph<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 { getColorInputChannelGlyph } from '@pbroom/color-kit/driver';
getColorInputChannelGlyph('oklch', 'c'); // → 'C'
getColorInputChannelGlyph('rgb', 'alpha'); // → 'α'