-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
implementing RGB to xy Color conversion #272
Comments
Good idea! |
@Koenkk Lets build some sort of converter ;)
|
RGB values are now supported! E.G. |
Please, rewrite "spread" construction for better support NodeJS 4.* |
Is there also a way to go the other way around? Say if you have the x and y value from zigbee2mqtt but need rgb? |
I've got the same question as sjorge. Now we can set the color in RGB, but we still get the current state in xy, so I need to convert that back to RGB as well. |
HI @Koenkk , But is think there is still something wrong in the implementation. Within RGB is should be a brightness information but Zigbee2Mqtt seems to ignore it. My Setup: Sending color Code via HEX or RGB is working for Color but without brightness values. Do you have an idea how to get the Brightness Information out of the RGB values within the conversion in Zigbee2MQTT? |
This is correct, the RGB color value should be the color at maximum brightness, and so at least one of the r,g,b values should be 255.
Get max(r,g,b)/255, this is the brightness (0.0 - 1.0). |
Is it possible to add this directly into Zigbee2Mqtt? |
For easier work with Color on lights we should provide some sort of RGB to xy Color conversion as extension for zigbee-converter.
The text was updated successfully, but these errors were encountered: