diff --git a/source/Ox/js/Color.js b/source/Ox/js/Color.js index 16588b50..2a2791b1 100644 --- a/source/Ox/js/Color.js +++ b/source/Ox/js/Color.js @@ -19,7 +19,7 @@ Ox.hsl = function(rgb) { if (arguments.length == 3) { rgb = Ox.makeArray(arguments); } - rgb = rgb.map(function(val) { + rgb = Ox.clone(rgb).map(function(val) { return val / 255; }); var max = Ox.max(rgb), @@ -66,6 +66,7 @@ Ox.rgb = function(hsl) { if (arguments.length == 3) { hsl = Ox.makeArray(arguments); } + hsl = Ox.clone(hsl); hsl[0] /= 360; var rgb = [0, 0, 0], v1, v2, v3;