akx / illuminatrix

Fancy light schemes for your home
MIT License
6 stars 0 forks source link

Replace Hue scenes with more correct data #9

Closed akx closed 1 year ago

akx commented 1 year ago

See #8 and https://gist.github.com/Hypfer/a0a8b5b9429831a7306ec4300077eaaa.

Thank you @hypfer & @coderph0x!

coderph0x commented 1 year ago

I see that you converted the colors to rgb. Throughout the Hue developers guild (which I'm not a part of :D) there's consensus that colors should be set using the native xy model, since this brings reproducible effects. During my tests different kinds of bulbs reported different values for rgb, so I'm not sure if you'll be happy with those values. The xy values, however, were consistent to the fourth decimal. Thus I'd recommend sticking to the latter.

akx commented 1 year ago

@coderph0x Yeah, Illuminatrix currently works in RGB only (and talks RGB to Home Assistant too, naturally). I used this library and this gamut for the conversion. I suppose it wouldn't be impossible to add native XY to Illuminatrix though!

(I'm not sure reproducibility and accuracy are the main point for Illuminatrix though, since it's already doing variations on the colors in OKLCH space.)

In any case thank you so much for the conversion legwork!

coderph0x commented 1 year ago

You're welcome. In the end it was a good opportunity to brush up my SQL and JSON skills again. It was just a recommendation since I have no clue how your software works internally. I'm sure the difference will be tolerable and if anyone needs the accuracy of the original color values, Hypfer's gist is still there. Good luck with the further development. 👍🏻