Eno::Loaders ยป #color
color โ string
color_items โ array
color_list โ array
Accepts values formatted as #RRGGBB
or #RGB
(case insensitive), returns the value unchanged (or raises an error for invalid values).
enostates:
active = #F00
hover = #ff0000
focus = blue
rubystates = Eno.parse(input).fieldset('states')
states.color('active') #=> '#F00'
states.color('hover') #=> '#ff0000'
states.color('focus')
# raises an error: 'focus' must contain a color, for instance '#B6D918', '#fff' or '#01b'.