Variable ColorDetectorsConst

ColorDetectors: ColorDefinitions = ...

This is used to detect a specific color model string via regular expression, normalize the values to be within 0..1 for percentages and RGB, and 0..360 for angles.

Remarks

Each detector has a list of responsibilities:

  • detect the color model from an input string using a regular expression
  • normalize the output of the regex to numeric representations (ex. '0.5turn' will become 180; '255' will become 1)
  • convert the normalized values to the new color model
  • finalize the converted values to the ones used in the output string (ex. 1 might become 255 or 'ff')

Generated using TypeDoc