1
Vote

HueLight.HueToRGB()

description

float tempSat = (float)(Saturation / 245.0);

vs

float tempSat = (float)(Saturation / 255.0);

I realize there might be a correction here that I'm unfamiliar with but the result of the 245 algorithm was that I ended up getting retrurned negative values for my blue component.

Sample Hue / Saturation
13050 / 252

Raw data

{"state": {"on":true,"bri":253,"hue":13050,"sat":252,"xy":[0.5382,0.4216],"ct":500,"alert":"none","effect":"none","colormode":"xy","reachable":true}, "type": "Extended color light", "name": "hallway far", "modelid": "LCT001", "swversion": "66010820", "pointsymbol": { "1":"none", "2":"none", "3":"none", "4":"none", "5":"none", "6":"none", "7":"none", "8":"none" }}

comments