Eno\Loaders ยป color

color() โ†’ string
colorItems() โ†’ array
colorList() โ†’ array

Accepts values formatted as #RRGGBB or #RGB (case insensitive), returns the value unchanged (or throws a ValidationError for invalid values).

enoactive: #F00
hover: #ff0000
focus: blue
php$document = Parser::parse($input);

$document->color('active');  // returns '#F00'
$document->color('hover');  // returns '#ff0000'

$document->color('focus');
  // throws a ValidationError: 'focus' must contain a color, for instance '#B6D918', '#fff' or '#01b'.