YUI.add("color-hsl",function(s,o){Color={REGEX_HSL:/hsla?\(([.\d]*), ?([.\d]*)%, ?([.\d]*)%,? ?([.\d]*)?\)/,STR_HSL:"hsl({*}, {*}%, {*}%)",STR_HSLA:"hsla({*}, {*}%, {*}%, {*})",toHSL:function(o){return s.Color._convertTo(o,"hsl").toLowerCase()},toHSLA:function(o){return s.Color._convertTo(o,"hsla").toLowerCase()},_rgbToHsl:function(o,r){var o=s.Color.REGEX_RGB.exec(o),l=o[1]/255,t=o[2]/255,o=o[3]/255,n=Math.max(l,t,o),e=Math.min(l,t,o),h=!1,a=n-e,e=n+e,n=0==a?0:l===n?(60*(t-o)/a+360)%360:t===n?60*(o-l)/a+120:60*(l-t)/a+240,u=e/2,l=(h=l==t&&t==o?!0:h)?0:0===u||1===u?u:u<=.5?a/e:a/(2-e);return n=Math.round(n),l=Math.round(100*l),u=Math.round(100*u),r?[n,l,u]:"hsl("+n+", "+l+"%, "+u+"%)"},_hslToRgb:function(o,r){var o=s.Color.REGEX_HSL.exec(o),l=parseInt(o[1],10)/360,t=parseInt(o[2],10)/100,o=parseInt(o[3],10)/100,t=o<=.5?o*(1+t):o+t-o*t,o=2*o-t,n=Math.round(255*Color._hueToRGB(o,t,l+1/3)),e=Math.round(255*Color._hueToRGB(o,t,l)),o=Math.round(255*Color._hueToRGB(o,t,l-1/3));return r?[n,e,o]:"rgb("+n+", "+e+", "+o+")"},_hueToRGB:function(o,r,l){return l<0?l+=1:1<l&&--l,6*l<1?o+6*(r-o)*l:2*l<1?r:3*l<2?o+(r-o)*(2/3-l)*6:o}},s.Color=s.mix(Color,s.Color),s.Color.TYPES=s.mix(s.Color.TYPES,{HSL:"hsl",HSLA:"hsla"}),s.Color.CONVERTS=s.mix(s.Color.CONVERTS,{hsl:"toHSL",hsla:"toHSLA"})},"patched-v3.18.3",{requires:["color-base"]});