Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libs/bower_components/chroma-js/chroma.js')
-rw-r--r--libs/bower_components/chroma-js/chroma.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/bower_components/chroma-js/chroma.js b/libs/bower_components/chroma-js/chroma.js
index 03bdf600c6..7433eaae41 100644
--- a/libs/bower_components/chroma-js/chroma.js
+++ b/libs/bower_components/chroma-js/chroma.js
@@ -290,9 +290,9 @@
mode += 'a';
}
if (mode === 'rgb') {
- return mode + '(' + rgb.slice(0, 3).join(',') + ')';
+ return mode + '(' + rgb.slice(0, 3).map(Math.round).join(',') + ')';
} else if (mode === 'rgba') {
- return mode + '(' + rgb.join(',') + ')';
+ return mode + '(' + rgb.slice(0, 3).map(Math.round).join(',') + ',' + rgb[3] + ')';
} else if (mode === 'hsl' || mode === 'hsla') {
hsl = me.hsl();
rnd = function(a) {