From bd8dbc79dd52f20244565e734a7b688c0953d31c Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Tue, 23 Feb 2016 13:19:33 -0800 Subject: [PATCH] Created Color objects (markdown) --- Color-objects.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Color-objects.md diff --git a/Color-objects.md b/Color-objects.md new file mode 100644 index 0000000..ab85958 --- /dev/null +++ b/Color-objects.md @@ -0,0 +1,20 @@ +There are several color objects that can be used to define and blend colors. While all can be directly used to set the pixel color, the RgbwColor can only be used with a NeoPixelBus that has been declared with NeoRgbwFeature or a compile error will be given. + +# RgbColor object +This represents a color as RGB model and exposes useful methods to manipulate colors. This is the native color used and is the most efficient. +The color components are Red, Green, and Blue. + +# RgbwColor object +This represents a color as RGBW model and exposes useful methods to manipulate colors. This is the native color used and is the most efficient with a NeoPixelBus defined wit NeoRgbwFeature. +The color components are Red, Green, Blue, and White. +This can only be used with NeoPixelBus that was declared with a four element color feature like NeoRgbwFeature. + +# HslColor object +This represents a color as a HSL model and exposes useful methods to manipulate colors. While not the native color used, the extra overhead will be offset by intuitive color components and effects. +The color components are Hue, Saturation, and Lightness, all in the range of 0.0 to 1.0. +To darken the color, just reduce the L property. To brighten the color, just increase the L property. A normal range for L is from 0.0f to 0.5f when Saturation is set to 1.0f. +To randomly pick a full bright color, just randomly pick a Hue and set Saturation at 1.0f and Lightness to 0.5f. + +# HsbColor object +This represents a color as a HSL model and exposes useful methods to manipulate colors. While not the native color used, the extra overhead will be offset by intuitive color components and effects. +This is included for completeness for those who are given code that uses this older format. \ No newline at end of file