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

Iaconos rgbled #12

Open
wants to merge 10 commits into
base: rgb-led
Choose a base branch
from
Open

Iaconos rgbled #12

wants to merge 10 commits into from

Conversation

iaconos
Copy link

@iaconos iaconos commented Jan 12, 2022

Tried original wallysami rgb-led version and found the use of alpha to caused a lack of brightness in LED rendering and also resulted in less realistic blending of red-green-blue values.

This version addresses both of those issues. It uses realistic brightness and realistic colors.

Tried original wallysami rgb-led version and found the use of alpha to caused a lack of brightness in LED rendering and also resulted in less realistic blending of red-green-blue values. 

This version addresses both of those issues. It uses realistic brightness and realistic colors.
Tried original wallysami rgb-led version and found the use of alpha to caused a lack of brightness in LED rendering and also resulted in less realistic blending of red-green-blue values. 

This version addresses both of those issues. It uses realistic brightness and realistic colors.

This commit includes slight correction to previous commit.
image file necessary for improved rgbled
@wallysalami
Copy link
Owner

I tried something like that at first, but the LED gets significantly darker with a initial value:

Captura de Tela 2022-01-12 às 19 00 13

In my real life tests, the LED gets really bright for small values and doesn't vary that much from there. This is why I tried a color shift and a non-linear scale.

rgba_components = [value ** 0.3 * 0.6 + 0.4 for value in self._current_state]

and this was the result

Captura de Tela 2022-01-12 às 19 07 17

This is not an easy thing to represent in a computer screen. The color combination in some real LEDs doesn't blend very well in many cases.

But there are definitely things to improve in my solution (e.g. blue light should be more greenish, the color mixture is not quite right for all cases, etc). I'll think about it.

@iaconos
Copy link
Author

iaconos commented Jan 12, 2022 via email

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

Successfully merging this pull request may close these issues.

2 participants