Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ColorSpec<M, K>

Type parameters

Hierarchy

  • ColorSpec

Index

Properties

Optional channels

channels?: Partial<Record<K, ChannelSpec>>

Define additional per-channel constraints, information. Currently only used to define limits.

from

from: Partial<Record<ColorMode, ColorOp | Tuple<ColorOp, 2 | 3 | 4>>> & { rgb: ColorOp }

Conversions from source modes. rgb is mandatory, others optional. If a key specifies an array of functions, these will be applied to source color in LTR order.

mode

mode: M

order

order: readonly K[]

Channel names in index order (used to define channel accessors).

toRgb

toRgb: ColorOp | Tuple<ColorOp, 2 | 3 | 4>

Mandatory conversion to RGB mode. Used as fallback solution if no other direct conversion path is defined (e.g. for CSS formatting).

Generated using TypeDoc