Method: ColorLib::HSL#initialize

Defined in:
lib/color_lib/hsl.rb

#initialize(h = 0, s = 0, l = 0) ⇒ HSL

Creates an HSL colour object from the standard values of degrees and percentages (e.g., 145 deg, 30%, 50%).



33
34
35
36
37
# File 'lib/color_lib/hsl.rb', line 33

def initialize(h = 0, s = 0, l = 0)
  @h = h / 360.0
  @s = s / 100.0
  @l = l / 100.0
end