Module: WatirVisualDiff::ColorMethods

Includes:
ChunkyPNG::Color
Included in:
Image, Modes::Base
Defined in:
lib/watir_visual_diff/color_methods.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#blueObject



19
20
21
# File 'lib/watir_visual_diff/color_methods.rb', line 19

def blue
  rgb(0, 0, 255)
end

#brightness(a) ⇒ Object



7
8
9
# File 'lib/watir_visual_diff/color_methods.rb', line 7

def brightness(a)
  0.3 * r(a) + 0.59 * g(a) + 0.11 * b(a)
end

#greenObject



15
16
17
# File 'lib/watir_visual_diff/color_methods.rb', line 15

def green
  rgb(0, 255, 0)
end

#redObject



11
12
13
# File 'lib/watir_visual_diff/color_methods.rb', line 11

def red
  rgb(255, 0, 0)
end