Class: Graphics::Greyscale
Overview
Black to white gradient
Instance Attribute Summary
Attributes inherited from Rainbow
Instance Method Summary collapse
-
#_color(degree) ⇒ Object
:nodoc:.
Methods inherited from Rainbow
#cache_colors, #clamp, #color, #initialize, #scale
Constructor Details
This class inherits a constructor from Graphics::Rainbow
Instance Method Details
#_color(degree) ⇒ Object
:nodoc:
52 53 54 55 56 57 |
# File 'lib/graphics/rainbows.rb', line 52 def _color degree # :nodoc: brightness_unit = degree/360.0 brightness = (brightness_unit*255.0).floor # Scale back to RGB [brightness, brightness, brightness] end |