dominicusmento / CSharpTradFriLibrary

This is a .NET Standard (2.0) library to communicate with the IKEA Home (Tradfri) ZigBee-based Gateway.
GNU General Public License v3.0
37 stars 20 forks source link

Feature/#25 color wrapper fixes and additions #38

Closed domjancik closed 4 years ago

domjancik commented 4 years ago

Fixed some issues resulting in the X and Y based color functions not working.

Added a simple intensity calculation from RGB values to control dimming - maximum of the individual components. The components are expected to fall between 0 and 255. This should result in colors as bright as possible and works well enough - tested with Tradfri color bulbs.

There are however other ways to approach this. For instance the eclipse/smarthome XY conversion includes the capital Y value in the brightness calculation. Maybe this results in more natural dimming curves but I'm not sure. It looks like the dimmer never goes full this way though. In any case it might be worth investigating.

dominicusmento commented 4 years ago

thanks for contribution!