diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-19 06:59:14 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-19 06:59:14 +0200 |
commit | 00ad23f3c1a3e08f4ac4c0108cf79add3a808302 (patch) | |
tree | 6eea3452dd8026f755e8e40bd4954f231b1e175f /core | |
parent | 974f09b730acb3e1c5e770703f1536081a51a121 (diff) | |
parent | e11b39a248dd133f8ac08782935d0b522dd85fd8 (diff) | |
download | nextcloud-server-00ad23f3c1a3e08f4ac4c0108cf79add3a808302.tar.gz nextcloud-server-00ad23f3c1a3e08f4ac4c0108cf79add3a808302.zip |
Merge pull request #24049 from owncloud/skjnldsv-fix-colors-values
Fix rgb values
Diffstat (limited to 'core')
-rw-r--r-- | core/js/placeholder.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/js/placeholder.js b/core/js/placeholder.js index da721ac5bcb..1b03a28ecca 100644 --- a/core/js/placeholder.js +++ b/core/js/placeholder.js @@ -92,7 +92,7 @@ // Init vars var result = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; var rgb = [0, 0, 0]; - var sat = 80; + var sat = 70; var lum = 68; var modulo = 16; @@ -106,6 +106,12 @@ for(var count=1;count<modulo;count++) { rgb[count%3] += parseInt(result[count]); } + + // Reduce values bigger than rgb requirements + rgb[0] = rgb[0]%255; + rgb[1] = rgb[1]%255; + rgb[2] = rgb[2]%255; + var hsl = rgbToHsl(rgb[0], rgb[1], rgb[2]); // Classic formulla to check the brigtness for our eye |