Module: PixelPi
- Defined in:
- lib/pixel_pi/version.rb,
ext/pixel_pi/leds.c
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.0.2"
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.
426 427 428 429 430 431 |
# File 'ext/pixel_pi/leds.c', line 426
static VALUE
pp_color( VALUE klass, VALUE red, VALUE green, VALUE blue )
{
int color = pp_rgb_to_color( red, green, blue );
return INT2FIX(color);
}
|