Merge pull request #21323 from owncloud/placeholder_sane_precission

[Avatars] Calculate 'sane' hue precissions
This commit is contained in:
Roeland Douma 2015-12-24 11:01:27 +01:00
commit fd96331e59
1 changed files with 2 additions and 2 deletions

View File

@ -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%)');