@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.

functionimport { getColorInputChannelGlyph } from '@pbroom/color-kit/driver';color-input.ts:423
function getColorInputChannelGlyph<Model extends ColorInputModel>(
  model: Model,
  channel: ColorInputChannelFor<Model>,
): string;

Parameters

modelModel

Returns

string

Throws

  • When channel does not belong to model.

Example

TypeScript
import { getColorInputChannelGlyph } from '@pbroom/color-kit/driver';

getColorInputChannelGlyph('oklch', 'c'); // → 'C'
getColorInputChannelGlyph('rgb', 'alpha'); // → 'α'