Method: Color::HSL#css_hsl

Defined in:
lib/color/hsl.rb

#css_hslObject

Present the colour as an HSL HTML/CSS colour string (e.g., “hsl(180, 25%, 35%)”).

[View source]

51
52
53
# File 'lib/color/hsl.rb', line 51

def css_hsl
  "hsl(%3.2f, %3.2f%%, %3.2f%%)" % [ hue, saturation, luminosity ]
end