aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Douma <rullzer@users.noreply.github.com>2015-12-24 11:01:27 +0100
committerRoeland Douma <rullzer@users.noreply.github.com>2015-12-24 11:01:27 +0100
commitfd96331e590198407bf813fba2505b63f3212e1f (patch)
treeb569c7fe0caa0c6095ad74339181efd2f373e30e
parent9cdc3f0558b8c278e91037c2330b876da7ca99e2 (diff)
parent2fc458479e289e5157864f3ed817bba179461e2d (diff)
downloadnextcloud-server-fd96331e590198407bf813fba2505b63f3212e1f.tar.gz
nextcloud-server-fd96331e590198407bf813fba2505b63f3212e1f.zip
Merge pull request #21323 from owncloud/placeholder_sane_precission
[Avatars] Calculate 'sane' hue precissions
-rw-r--r--core/js/placeholder.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/js/placeholder.js b/core/js/placeholder.js
index 26eb3507d7b..5fb5b5b8f80 100644
--- a/core/js/placeholder.js
+++ b/core/js/placeholder.js
@@ -51,8 +51,8 @@
// set optional argument "text" to value of "seed" if undefined
text = text || seed;
- var hash = md5(seed),
- maxRange = parseInt('ffffffffffffffffffffffffffffffff', 16),
+ var hash = md5(seed).substring(0, 4),
+ maxRange = parseInt('ffff', 16),
hue = parseInt(hash, 16) / maxRange * 256,
height = this.height() || size || 32;
this.css('background-color', 'hsl(' + hue + ', 90%, 65%)');