Tests and fix for #1689

This commit is contained in:
Synchro
2013-11-29 01:24:25 +01:00
parent 13f41017ed
commit 167e802875
3 changed files with 10 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ tree.functions = {
return this.rgba(r, g, b, 1.0);
},
rgba: function (r, g, b, a) {
var rgb = [r, g, b].map(function (c) { return scaled(c, 256); });
var rgb = [r, g, b].map(function (c) { return scaled(c, 255); });
a = number(a);
return new(tree.Color)(rgb, a);
},

View File

@@ -78,3 +78,7 @@
#alpha #hsl {
opacity: 1;
}
#percentage {
color: 255;
border-color: rgba(255, 0, 0, 0.5);
}

View File

@@ -90,3 +90,8 @@
opacity: alpha(hsl(120, 100%, 50%));
}
}
#percentage {
color: red(rgb(100%, 0, 0));
border-color: rgba(100%, 0, 0, 50%);
}