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
Make rainbow effects more colorful #3681
base: 0_15
Are you sure you want to change the base?
Conversation
Bravo! That boggled me as well. |
One more thing: As to avoid angering certain users please make the new color wheel calculation optional. |
Update: Please check |
Tested this today but have to say that I fail to see any real difference on my LEDs. |
Hm. You are right. There is a difference for me, but I can't really say that one better than the other. My version certainly is a bit brighter (obviously, now that I think about it). I have the cheapest LEDs I could find though. Possibly there might be a greater difference with higher quality or future LEDs or setups. I mean there clearly is a difference on an LCD screen. |
I did actually look at that when I worked on
If you wish, (and if you want to keep my version in the first place,) I can have a look at what's possible, but it won't be as optimal. It might result in an ever so slightly smaller binary though. |
I've already updated code to utilize both as an option. Please review and comment. |
I saw that. Some more explicit feedback:
|
Another option would be to keep the original function for ESP8266, and use the hsv function for ESP32. I made some comparisons between the color computation of these functions: D1 Mini
WT32-ETH01
|
Are you talking about |
|
Perhaps change |
According to godbolt's compiler explorer, that produces the same binary |
Nice to learn something new. Quite a different ASM to Z80. ;) So simpler C code produces 27% overhead. Who would've thought. |
I was playing around with some rainbow effects and was wondering why there was no real yellow color. Cyan and magenta are also mysteriously underrepresented. I think rainbow effects should use the full rainbow spectrum.
If you agree, that is what this PR does.
Here are two images displaying the Rainbow effect on 256 LEDs, captured using the web UI:
Top: 0_15 (874b24f)
Bottom: mine (760a1d4)
This works by replacing the linear transitions R -> G -> B in
color_wheel
by the HSV transition 0° -> 360°.