pythoncolorslightphilips-hue

How to convert rgb to hue color format?


im working with the phue library and want to change the color with

b.set_group(group, "hue", color)

I have read, that color is a number between 0 and 65535.

I want to input a rgb number, so i will need to convert it first. May someone got a idea how i can do this?


Solution

  • You may gain some conversion help from these links:

    https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX/blob/00187a3db88dedd640f5ddfa8a474458dff4e1db/ApplicationDesignNotes/RGB%20to%20xy%20Color%20conversion.md

    https://github.com/studioimaginaire/phue/blob/master/examples/rgb_colors.py