Class: Chroma::RgbGenerator::FromHsv
- Defined in:
- lib/chroma/rgb_generator/from_hsv.rb
Instance Method Summary collapse
-
#generate ⇒ ColorModes::Rgb
Generates a ColorModes::Rgb.
-
#initialize(format, hsv) ⇒ FromHsv
constructor
A new instance of FromHsv.
Methods included from Helpers::Bounders
#bound01, #bound_alpha, #clamp01, #to_percentage
Constructor Details
#initialize(format, hsv) ⇒ FromHsv
Returns a new instance of FromHsv.
6 7 8 9 |
# File 'lib/chroma/rgb_generator/from_hsv.rb', line 6 def initialize(format, hsv) @format = format @hsv = hsv end |
Instance Method Details
#generate ⇒ ColorModes::Rgb
Generates a ColorModes::Rgb.
13 14 15 |
# File 'lib/chroma/rgb_generator/from_hsv.rb', line 13 def generate FromHsvValues.new(@format, *@hsv.to_a).generate end |