PhilipsHue / PhilipsHueSDK-iOS-OSX

The Software Development Kit for Philips Hue on iOS and OS X (beta)
579 stars 169 forks source link

RGB to HSL #61

Closed zuil7 closed 9 years ago

zuil7 commented 10 years ago

Hi,

   I tried converting RGB to HSL. My values after converting are correct base on this site http://colorizer.org/. But the color of the light from the bulb is wrong when i apply it on the sample demo. Can you explain more on how to convert RGB to HSL. Or can you make it more clear on how to use colorFromXY and calculateXY functions. You instructions are not clear enough. 

Thanks!

pverh commented 10 years ago

You say you are trying to convert RGB to HSL, but the SDK uses the HSB color format. I see the site you are using can convert to this value as well so you might want to try that. More information on this subject can be found here: https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX/blob/master/ApplicationDesignNotes/RGB%20to%20xy%20Color%20conversion.md