Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Hi danvy, could you please help me with using your library and a color slider to change the colors of the bulb?
    My problem is that the slider returns a RGB style color and your library command (RGBWColorAsync) accepts a byte.
    Melvin van Kalsbeek
    This message was deleted

    Hi @tpanicos ,

    MiLight's use a weird way of display color. You're able to set a Hue (color degree) by sending a byte (so 0 -255) value. There are formulas to convert a color to the MiLight format however. I've written a C# library that has methods that either accept a color's hue (from 0 - 360 degrees) or a System.Drawing.Color object, which has the advantage of playing along nicely with the .NET framework.

    You're welcome to check out my repository (https://github.com/Milfje/MiControl) to either use the library or using the parts of code you need (hint: look in MiController.cs). If you're feeling productive, you'd be welcome to contribute to the project :).

    Good luck, and feel free to send me a message if you need any help!