-
Notifications
You must be signed in to change notification settings - Fork 5
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
How to control the brightness of the entire strip #3
Comments
Hi! Considering how extremely bright these leds tend to be I guess that a lot of people will wonder the same thing, thanks for asking. The RGB value we are setting actually selects the brightness level of one of the three R,G,B independent components that make up each single WS2812 led (from 0-255, with 0 the single component is barely visible, with 255 it has maximum blinding brightness), and that's the only thing that can be controlled.
So, selecting a pure red (255-0-0) with 25% brightness (setBrightness(63)), the value used to configure the strip will actually be 63-0-0. Configuring this value manually without touching the brightness would give you the same result. The first prototypes of this library had the same thing, but it was later removed since the result is not really convincing (ramping up from 0 to 255 the light is not perceived to increase as smoothly as it should for lack of proper gamma correction) and because as explained above it requires hidden changes to the value selected by the user just to deliver subpar results. I just thought that those who needed to alter the brightness would have just implemented scaling manually on their RGB values doing a But now that I take another look at this, implement brightness w/ gamma correction (1,2) and see how it looks on a couple of strips could be a good idea :) |
Do you know of a simple way to decrease the brightness with Swift? Like
setBrightness(uint8_t b)
in the Arduino code.Thanks!
The text was updated successfully, but these errors were encountered: