Class: Sassafras::Tints

Inherits:
ColorSet show all
Defined in:
lib/sassafras.rb

Instance Method Summary collapse

Methods inherited from ColorSet

#colors, #method_missing

Constructor Details

#initialize(base_rgb, prefix = nil) ⇒ Tints

Returns a new instance of Tints.



157
158
159
160
161
162
163
164
165
# File 'lib/sassafras.rb', line 157

def initialize(base_rgb, prefix=nil)
  super(base_rgb, prefix)
  @colors = {
    'mid'      => @rgb.html,
    'light'    => @rgb.lighten_by(50).html,
    'lighter'  => @rgb.lighten_by(30).html,
    'lightest' => @rgb.lighten_by(10).html
  }
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Sassafras::ColorSet