-
Notifications
You must be signed in to change notification settings - Fork 26
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 color values over-saturated on ESP32 C6 #29
Comments
The values should be between 0 and 1 if the xy value is within the RGB color space. If it is outside then there will be clipping. I don't know much about color spaces, but there are plenty of possibilities to convert them: http://brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html |
Thanks for your answer. Also, thank you for your suggestions on how to fix it. I had briefly looked into the code you mentioned, which converts between the color spaces, but then I found the lower effort solution (meaning without touching the c code) via the fixed scale-down by 2.55 in the yaml-configuration. I was just wondering, whether this is somehow specific to my setup, be it the ZigBee controller or the ESP C6 board, or whether I could contribute an up-stream fix to the example yaml for others. If you do not have any issues with the RGB values on your end, then it probably is due to the setup differences. |
First of all: Thank you for putting this repo together. It helped my a lot to figure out my Zigbee troubles.
I got the example configuration example_esp32c6.yaml to run on a C6 dev board, but I noticed that the colors where not showing up correctly on the on-board LED. The LED was mostly white for nearly all color targets I tried.
On the log output I see, that the RGB values calculated from the x and y values are clipped, because they are above 1.00. Here the output for (x,y)=(11141,6554), which should correspond roughly to (r,g,b)=(58,74,255) (on a scale 0-255)
By playing around with the x and y values it became apparent that the resulting RGB values are in the wrong range namely 0-2.55 instead of 0-1. Therefore, the correct scaling can be applied in the configuration:
Is that somehow an issue isolated to the specific C6 module I am using or should that be applied to the example yaml?
BTW: my setup is a ZB-GW03 controller running Zigbee2Tasmota, but I also tested the color settings running ZHA and got the same wrong colors.
The text was updated successfully, but these errors were encountered: