lib/chroma/rgb_generator/from_hsl.rb in chroma-0.0.1.alpha.2 vs lib/chroma/rgb_generator/from_hsl.rb in chroma-0.0.1.alpha.3
- old
+ new
@@ -1,12 +1,16 @@
module Chroma
module RgbGenerator
class FromHsl < Base
+ # @param format [Symbol] color format
+ # @param hsl [ColorModes::Hsl]
def initialize(format, hsl)
@format = format
@hsl = hsl
end
+ # Generates a {ColorModes::Rgb}.
+ # @return [ColorModes::Rgb]
def generate
FromHslValues.new(@format, *@hsl.to_a).generate
end
end
end