node-pixel
node-pixel copied to clipboard
LED brightness
Is there any way to control LED brightness in node-pixel, and if not is it potentially on the roadmap? Thank you!
There's not a way that's baked into the code right now. The way I do it is to use the color library.
At the end of the day, all the firmware cares about is getting the right RGB value to display the pixel so really you want to be computing that on the node side.
So you can do this:
let color = Color('#7743CE');
color.lighten(0.5);
strip.color(color.string()); // strip will now be 50% lighter than original
Now NodePixel has correction in it this works fairly reliably.
Would be very interested in having brightness control too. The method above with the color library works to an extent but the results are still not perfect.
Actually I am seeing better results with color.darken, this may well be enough for now.
Has there been any movement on this? It would be really useful to set a color value and change just brightness values, similar to the way that FastLED utilizes HSV.
PRs for this definitely accepted. As you can use HSV on the color side it should just be a case of converting and then bumping the brightness up or down
On Tue, Dec 18, 2018, 05:51 Charles F [email protected] wrote:
Has there been any movement on this? It would be really useful to set a color value and change just brightness values, similar to the way that FastLED utilizes HSV.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ajfisher/node-pixel/issues/111#issuecomment-447956282, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHRo5l7RJ1_z35X9341ZNDnOfM7ByDFks5u5-e7gaJpZM4P17PG .