Method: String#to_color

Defined in:
lib/colorist/core_extensions.rb

#to_colorObject

Converts a CSS-style color string to a Color. Can be in the full form (\#112233), the abbreviated form (\#123) or a CSS named color ("black" or "maroon").



23
24
25
# File 'lib/colorist/core_extensions.rb', line 23

def to_color
  Colorist::Color.from_string(self)
end