Class: Sassafras::Shades
Instance Method Summary collapse
-
#initialize(base_rgb, prefix = nil) ⇒ Shades
constructor
A new instance of Shades.
Methods inherited from ColorSet
Constructor Details
#initialize(base_rgb, prefix = nil) ⇒ Shades
Returns a new instance of Shades.
171 172 173 174 175 176 177 178 179 |
# File 'lib/sassafras.rb', line 171 def initialize(base_rgb, prefix=nil) super(base_rgb, prefix) @colors = { 'mid' => @rgb.html, 'dark' => @rgb.darken_by(50).html, 'darker' => @rgb.darken_by(30).html, 'darkest' => @rgb.darken_by(10).html } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Sassafras::ColorSet