Library to control NeoPixel strings of RGB leds
Dependents: NeoPixelI2cSlave NeoPixelI2cSlave
Diff: colors.cpp
- Revision:
- 0:66a5d46a740f
diff -r 000000000000 -r 66a5d46a740f colors.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/colors.cpp Sun Oct 25 11:24:54 2015 +0000 @@ -0,0 +1,8 @@ +#include "colors.h" + +neopixel::Pixel ColorAdjuster::intensity(neopixel::Pixel pix, unsigned short intensity) { + pix.red *= (intensity / 100.0); + pix.green *= (intensity / 100.0); + pix.blue *= (intensity / 100.0); + return pix; +} \ No newline at end of file