diff --git a/src/display/color/RGBToString.js b/src/display/color/RGBToString.js index d25de69a2..3bb124441 100644 --- a/src/display/color/RGBToString.js +++ b/src/display/color/RGBToString.js @@ -27,7 +27,7 @@ var RGBToString = function (r, g, b, a, prefix) if (prefix === '#') { - return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1); + return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1, 7); } else {