Module: Imatcher::ColorMethods
- Includes:
- ChunkyPNG::Color
- Included in:
- Image, Modes::Base
- Defined in:
- lib/imatcher/color_methods.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#blue ⇒ Object
23 24 25 |
# File 'lib/imatcher/color_methods.rb', line 23 def blue rgb(0, 0, 255) end |
#brightness(a) ⇒ Object
11 12 13 |
# File 'lib/imatcher/color_methods.rb', line 11 def brightness(a) 0.3 * r(a) + 0.59 * g(a) + 0.11 * b(a) end |
#green ⇒ Object
19 20 21 |
# File 'lib/imatcher/color_methods.rb', line 19 def green rgb(0, 255, 0) end |
#red ⇒ Object
15 16 17 |
# File 'lib/imatcher/color_methods.rb', line 15 def red rgb(255, 0, 0) end |