mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-07 04:44:26 +02:00
Updated Color objects (markdown)
@@ -2,13 +2,28 @@ There are several color objects that can be used to define and blend colors. Wh
|
||||
|
||||
# [RgbColor object](https://github.com/Makuna/NeoPixelBus/wiki/RgbColor-object-API)
|
||||
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.
|
||||
The color components are Red, Green, and Blue each with 8 bits of precision. With a total of 24 bits.
|
||||
|
||||
# [RgbwColor object](https://github.com/Makuna/NeoPixelBus/wiki/RgbwColor-object-API)
|
||||
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 with NeoRgbwFeature.
|
||||
The color components are Red, Green, Blue, and White.
|
||||
The color components are Red, Green, Blue, and White each with 8 bits of precision. With a total of 32 bits.
|
||||
This can only be used with NeoPixelBus that was declared with a four element color feature like NeoRgbwFeature.
|
||||
|
||||
|
||||
# [Rgb16Color object](https://github.com/Makuna/NeoPixelBus/wiki/Rgb16Color-object-API)
|
||||
This represents a color as RGB 565 model and exposes useful methods to manipulate colors. It uses a single uint16_t to store the color.
|
||||
The color components are Red, Green, and Blue. 5 bits for red, 6 bits for green, and 5 bits for blue. With a total of 16 bits.
|
||||
|
||||
# [Rgb48Color object](https://github.com/Makuna/NeoPixelBus/wiki/Rgb48Color-object-API)
|
||||
This represents a color as RGB model and exposes useful methods to manipulate colors. This is the native color used with some color features where the pixel supports 16bit precision.
|
||||
The color components are Red, Green, and Blue each with 16 bits of precision. With a total of 48 bits.
|
||||
|
||||
# [Rgbw64Color object](https://github.com/Makuna/NeoPixelBus/wiki/Rgbw64Color-object-API)
|
||||
This represents a color as RGBW model and exposes useful methods to manipulate colors. This is the native color used with some color features where the pixel supports 16bit precision.
|
||||
The color components are Red, Green, Blue, and White each with 16 bits of precision. With a total of 64 bits.
|
||||
This can only be used with NeoPixelBus that was declared with a four element 16 bit color feature like NeoRgbwUcs8904Feature.
|
||||
|
||||
|
||||
# [HtmlColor object](https://github.com/Makuna/NeoPixelBus/wiki/HtmlColor-object-API)
|
||||
This represents a color as a single uint32_t and exposes minimal methods to convert colors. This is primarily used to convert standard Html color value to other color objects and back.
|
||||
The value is commonly represented in hexadecimal (ex. 0xff7f00). It is coded as three bytes, the left most being red (0xff), the middle being green (0x7f), and the right most being blue (0x00).
|
||||
@@ -26,4 +41,8 @@ Note: There are many examples of HSL that demonstrate Hue component having a val
|
||||
|
||||
# [HsbColor object](https://github.com/Makuna/NeoPixelBus/wiki/HsbColor-object-API)
|
||||
This represents a color as a HSB (aka HSV) 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.
|
||||
This is included for completeness for those who are given code that uses this older format.
|
||||
|
||||
# [SevenSegDigit object](https://github.com/Makuna/NeoPixelBus/wiki/SevenSegDigit-object-API)
|
||||
This represents a color as a Seven Segment Digit model and exposes useful methods to manipulate segments and brightness to form numbers and letters. This is the native color used with the seven segment color features like NeoAbcdefgpsSegmentFeature.
|
||||
The color components are the standard seven segment designator labels, A, B, C, D, E, F, G, period, and special each with 8 bits of brightness. With a total of 72 bits.
|
Reference in New Issue
Block a user