peter-murray / node-hue-api

Node.js Library for interacting with the Philips Hue Bridge and Lights
Apache License 2.0
1.19k stars 145 forks source link

lightState.rgb(255,255,255) produces red light #17

Closed esco closed 9 years ago

esco commented 9 years ago

Produces a red light after passing white rgb colors

lightState
.create()
.on()
.rgb(255,255,255)
.brightness(100)

Produces a white light after passing black rgb colors

lightState
.create()
.on()
.rgb(0, 0, 0)
.brightness(100)
peter-murray commented 9 years ago

I will take a look into this tonight, as it may be more practical to convert into the xy color space insterad of hsl values.

Incidentally, black is a meaningless color when it comes to hue bulbs, they cannot turn black, so white might make some sense there...

peter-murray commented 9 years ago

Can you try the latest version 0.2.5 of the module and see if that gives you better results?

In my testing it appears to give closer matches to the extremes and now uses a conversion from RGB to XY co-ordinates as documented for the iOS library, so should be about a good as I can get for now.

esco commented 9 years ago

Awesome I'll test this out today

On Friday, December 19, 2014, Peter Murray notifications@github.com wrote:

Can you try the latest version 0.2.5 of the module and see if that gives you better results?

In my testing it appears to give closer matches to the extremes and now uses a conversion from RGB to XY co-ordinates as documented for the iOS library, so should be about a good as I can get for now.

— Reply to this email directly or view it on GitHub https://github.com/peter-murray/node-hue-api/issues/17#issuecomment-67617231 .