Sha256: a9dd40cf6ca17d363b1574ffd80ea9fa60d186d104ca230f73235aa3a5945e46

Contents?: true

Size: 410 Bytes

Versions: 4

Compression:

Stored size: 410 Bytes

Contents

module Chroma
  module RgbGenerator
    class FromHsv < Base
      # @param format [Symbol] color format
      # @param hsv    [ColorModes::Hsv]
      def initialize(format, hsv)
        @format = format
        @hsv = hsv
      end

      # Generates a {ColorModes::Rgb}.
      # @return [ColorModes::Rgb]
      def generate
        FromHsvValues.new(@format, *@hsv.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_hsv.rb
chroma-0.1.0 lib/chroma/rgb_generator/from_hsv.rb
chroma-0.0.1 lib/chroma/rgb_generator/from_hsv.rb
chroma-0.0.1.alpha.3 lib/chroma/rgb_generator/from_hsv.rb