Method: Color::HSL#css_hsl
- Defined in:
- lib/color/hsl.rb
permalink #css_hsl ⇒ Object
Present the colour as an HSL HTML/CSS colour string (e.g., “hsl(180, 25%, 35%)”).
51 52 53 |
# File 'lib/color/hsl.rb', line 51 def css_hsl "hsl(%3.2f, %3.2f%%, %3.2f%%)" % [ hue, saturation, luminosity ] end |