Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGB Leds and Brightness #52

Open
directionless opened this issue May 7, 2019 · 2 comments
Open

RGB Leds and Brightness #52

directionless opened this issue May 7, 2019 · 2 comments

Comments

@directionless
Copy link

Modern RGB leds are amazingly bright. This often leads to wanting to set some global brightness level. I'm not sure if this is more desirable as something using the alpha channel, or as something that could be set for all leds.

I guess it's a bit lossy, since it would result in some floating point approximation. Still though, it seems valuable to me

@deadprogram
Copy link
Member

This could be done with a Luma calculation https://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color but not sure that this would go in any particular driver. Seems to me like this would be some application specific code.

@aykevl
Copy link
Member

aykevl commented May 7, 2019

Yes, I'm thinking the same. If the hardware has support for dimming we should use that in the driver, but otherwise leave it up to the application.
Also see this package that I've started to write, inspired by FastLED:
https://godoc.org/github.com/aykevl/ledsgo
It would certainly be useful to have some way to dim LEDs, so far I've used (ledsgo.Color).Value which has worked well enough for me so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants