Class: Color::Hues

Inherits:
Scheme show all
Defined in:
lib/color/scheme.rb

Instance Attribute Summary

Attributes inherited from Scheme

#hues

Instance Method Summary collapse

Methods inherited from Scheme

#add_hue, create_hue

Constructor Details

#initialize(startval, endval, interval) ⇒ Hues

Returns a new instance of Hues.



110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/color/scheme.rb', line 110

def initialize(startval, endval, interval)
  super()

  starthue = self.class.create_hue(startval)
  info "starthue: #{starthue}"
  endhue   = self.class.create_hue(endval)
  info "endhue: #{endhue}"
  
  (starthue .. endhue).step(interval) do |hue|
    add_hue(hue)
  end
end