rem: var t1 = brightness; var t2 = (255 - saturation) * brightness / 255; var t3 = (t1 - t2) * (hue % 60) / 60; if (hue < 60) red = t1, green = t2 + t3, blue = t2; else if (hue < 120) red = t1 - t3, green = t1, blue = t2; else if (hue < 180) red = t2, green = t1, blue = t2 + t3; else if (hue < 240) red = t2, green = t1 - t3, blue = t1; else if (hue < 300) red = t2 + t3, green = t2, blue = t1; else if (hue < 360) red = t1, green = t2, blue = t1 - t3; 
add: var hue = this[0] % 360; var f = hue % 60; var p = Math.round((this[2] * (100 - this[1])) / 10000 * 255); var q = Math.round((this[2] * (6000 - this[1] * f)) / 600000 * 255); var t = Math.round((this[2] * (6000 - this[1] * (60 - f))) / 600000 * 255); switch (Math.floor(hue / 60)){ case 0: return [br, t, p]; case 1: return [q, br, p]; case 2: return [p, br, t]; case 3: return [p, q, br]; case 4: return [t, p, br]; case 5: return [br, p, q]; } 
context: 	hsbToRgb: function(){		var red, green, blue;		var hue = Math.round(this[0]), saturation = Math.round(this[1] / 100 * 255), brightness = Math.round(this[2] / 100 * 255);		if (saturation == 0){			red = green = blue = brightness;		} else {			var t1 = brightness;			var t2 = (255 - saturation) * brightness / 255;			var t3 = (t1 - t2) * (hue % 60) / 60;			if (hue < 60) red = t1, green = t2 + t3, blue = t2;			else if (hue < 120) red = t1 - t3, green = t1, blue = t2;			else if (hue < 180) red = t2, green = t1, blue = t2 + t3;			else if (hue < 240) red = t2, green = t1 - t3, blue = t1;			else if (hue < 300) red = t2 + t3, green = t2, blue = t1;			else if (hue < 360) red = t1, green = t2, blue = t1 - t3;		}		return [Math.round(red), Math.round(green), Math.round(blue)];	}
meta: 7826	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/7826/e414964bece93fa515bc9002b6b04061c9063046/Color.js/buggy/Addons/Color.js