Fix alpha support in new Color#toCSS() code.

This commit is contained in:
Jürg Lehni 2014-01-05 17:42:46 +01:00
parent 1ee5b2c126
commit 1d37944c89

View file

@ -817,7 +817,7 @@ var Color = Base.extend(new function() {
convert(components[2])
];
if (alpha < 1)
components.push(val < 0 ? 0 : val);
components.push(alpha < 0 ? 0 : alpha);
return hex
? '#' + ((1 << 24) + (components[0] << 16)
+ (components[1] << 8)