rem: rgbToHSL: function (red, green, blue, alpha) { if (arguments.length == 1) { var rgb = red; red = rgb.r; green = rgb.g; blue = rgb.b; alpha = rgb.a; } var max = Math.max(red, Math.max(green, blue)); var min = Math.min(red, Math.min(green, blue)); var hue; var saturation; var lightness = (max + min) / 2.0; var delta = max - min; if (delta == 0) { hue = 0; saturation = 0; } else { if (lightness <= 0.5) { saturation = delta / (max + min); } else { saturation = delta / (2 - max - min); } if (red == max) { hue = (green - blue) / delta; } else if (green == max) { hue = 2 + ((blue - red) / delta); } else { hue = 4 + ((red - green) / delta); } hue /= 6; if (hue < 0) { hue += 1; } if (hue > 1) { hue -= 1; }  } return { h: hue, s: saturation, l: lightness, a: alpha }; }, 
add: },rgbToHSL:function(red,_517,blue,_518){ if(arguments.length==1){ var rgb=red; red=rgb.r; _517=rgb.g; blue=rgb.b; _518=rgb.a; } var max=Math.max(red,Math.max(_517,blue)); var min=Math.min(red,Math.min(_517,blue)); var hue; var _519; var _520=(max+min)/2; var _521=max-min; if(_521==0){ hue=0; _519=0; }else{ if(_520<=0.5){ _519=_521/(max+min); }else{ _519=_521/(2-max-min); } if(red==max){ hue=(_517-blue)/_521; }else{ if(_517==max){ hue=2+((blue-red)/_521); }else{ hue=4+((red-_517)/_521); } } hue/=6; if(hue<0){ hue+=1; } if(hue>1){ hue-=1; } } return {h:hue,s:_519,l:_520,a:_518}; },toColorPart:function(num){ 
context:     rgbToHSL: function (red, green, blue, alpha) {        if (arguments.length == 1) {            var rgb = red;            red = rgb.r;            green = rgb.g;            blue = rgb.b;            alpha = rgb.a;        }        var max = Math.max(red, Math.max(green, blue));        var min = Math.min(red, Math.min(green, blue));        var hue;        var saturation;        var lightness = (max + min) / 2.0;        var delta = max - min;        if (delta == 0) {            hue = 0;            saturation = 0;        } else {            if (lightness <= 0.5) {                saturation = delta / (max + min);            } else {                saturation = delta / (2 - max - min);            }            if (red == max) {                hue = (green - blue) / delta;            } else if (green == max) {                hue = 2 + ((blue - red) / delta);            } else {                hue = 4 + ((red - green) / delta);            }            hue /= 6;            if (hue < 0) {                hue += 1;            }            if (hue > 1) {                hue -= 1;            }        }        return {            h: hue,            s: saturation,            l: lightness,            a: alpha        };    },
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/ad067b3f5d648d6df90ec6fb2b79f0027612a307/MochiKit.js/buggy/trunk/lib/MochiKit.js