Sha256: ff3624240ab0edc2a3bc35fb7d90a284e0c0f62cdfccb9119c7f9eeb728e9cca

Contents?: true

Size: 410 Bytes

Versions: 4

Compression:

Stored size: 410 Bytes

Contents

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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
chroma-0.2.0 lib/chroma/rgb_generator/from_hsl.rb
chroma-0.1.0 lib/chroma/rgb_generator/from_hsl.rb
chroma-0.0.1 lib/chroma/rgb_generator/from_hsl.rb
chroma-0.0.1.alpha.3 lib/chroma/rgb_generator/from_hsl.rb