mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-10 06:14:26 +02:00
Updated RgbColor object API (markdown)
@@ -123,5 +123,9 @@ This will blend between four colors by the amount defined by 2d weighting values
|
|||||||
### uint8_t operator[](size_t idx)
|
### uint8_t operator[](size_t idx)
|
||||||
The index operator allows accessing the R, G, and B properties using an index. There are both read only and read write versions.
|
The index operator allows accessing the R, G, and B properties using an index. There are both read only and read write versions.
|
||||||
```
|
```
|
||||||
uint8_t green = color[1];
|
uint16_t green = color[1];
|
||||||
|
```
|
||||||
|
You can also use the color index constants.
|
||||||
|
```
|
||||||
|
uint16_t green = color[ColorIndexG];
|
||||||
```
|
```
|
Reference in New Issue
Block a user