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);
},