Method: Sass::Script::Color#to_s
- Defined in:
- lib/sass/script/color.rb
#to_s ⇒ Object Also known as: inspect
73 74 75 76 77 |
# File 'lib/sass/script/color.rb', line 73 def to_s return HTML4_COLORS_REVERSE[@value] if HTML4_COLORS_REVERSE[@value] red, green, blue = @value.map { |num| num.to_s(16).rjust(2, '0') } "##{red}#{green}#{blue}" end |