Merge pull request #5589 from neil-h/master

Stop RGBToString from returning CSS strings with decimal places
This commit is contained in:
Richard Davey 2021-03-24 15:56:27 +00:00 committed by GitHub
commit 0806f36685
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
{