listener.changeColor(this.mycolor);
this.changeColor(0x000000);
1) temp3--;
if(temp3*6 < 1) temp4 = temp1+(temp2-temp1)*6*temp3;
else if(temp3*2 < 1) temp4 = temp2;
else if(temp3*3 < 2) temp4 = temp1+(temp2-temp1)*((2/3)-temp3)*6;
else temp4 = temp1;
switch(i) {
case 0: r = Math.round(temp4*255); break;
case 1: g = Math.round(temp4*255); break;
case 2: b = Math.round(temp4*255); break;
}
}
}
return {r:r, g:g, b:b};
]]>
HUE
classroot.updateColor();
BRI
classroot.updateColor();
SAT
classroot.updateColor();
> 16) & 0xff;
var g = (c >> 8) & 0xff;
var b = c & 0xff;
var hsl = RGBtoHLS(r,g,b);
s_hue.setValue(hsl.h);
s_bri.setValue(hsl.l);
s_sat.setValue(hsl.s);
]]>