mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-07 12:54:26 +02:00
Updated FAQ (markdown)
4
FAQ.md
4
FAQ.md
@@ -36,12 +36,12 @@ NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod>* Strip = NULL;
|
||||
### How can I convert Hsl to Rgb and/or just set the colors with Hsl?
|
||||
There is a HslColor object that will automatically convert to any of the other color object by just assigning them.
|
||||
```
|
||||
HslColor myColor(244.0f, 1.0f, 0.5f);
|
||||
HslColor myColor(0.244f, 1.0f, 0.5f);
|
||||
RgbColor rgbOfMyColor = myColor;
|
||||
```
|
||||
Further, all the color objects can be used by the SetPixelColor().
|
||||
```
|
||||
HslColor myColor(244.0f, 1.0f, 0.5f);
|
||||
HslColor myColor(0.244f, 1.0f, 0.5f);
|
||||
strip.SetPixelColor(0, myColor);
|
||||
```
|
||||
The only limitation is that the RgbwColor can not be used directly with a NeoPixelBus defined with a 3 element feature like NeoRgbFeature or NeoGrbFeature. This is due to the loss of color that could happen. So the following will create a compile error.
|
||||
|
Reference in New Issue
Block a user