Method: Color::HSL#css_hsla
- Defined in:
- lib/color/hsl.rb
permalink #css_hsla ⇒ Object
Present the colour as an HSLA (with alpha) HTML/CSS colour string (e.g., “hsla(180, 25%, 35%, 1)”).
57 58 59 |
# File 'lib/color/hsl.rb', line 57 def css_hsla "hsla(%3.2f, %3.2f%%, %3.2f%%, %3.2f)" % [ hue, saturation, luminosity, 1 ] end |