Module: PixelPi
- Defined in:
- lib/pixel_pi/version.rb,
lib/pixel_pi/fake_leds.rb,
ext/pixel_pi/leds.c
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.2.1"
Class Method Summary collapse
-
.PixelPi::Color(red, green, blue) ⇒ Object
Given a set of RGB values return a single 24-bit color value.
Class Method Details
.PixelPi::Color(red, green, blue) ⇒ Object
Given a set of RGB values return a single 24-bit color value. The RGB values are nubmers in the range 0..255.
Returns a 24-bit RGB color value.
9 10 11 |
# File 'lib/pixel_pi/fake_leds.rb', line 9 def self.Color( red, green, blue ) ((red & 0xFF) << 16) | ((green & 0xFF) << 8) | (blue & 0xFF) end |