Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

Commit aab04fb

Browse files
committed
Force visually distinguishable account colors
1 parent 80ff550 commit aab04fb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

js/views/helper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ define(function(require) {
3636
var hash = md5(account);
3737
if (typeof hash.toHsl === 'function') {
3838
var hsl = hash.toHsl();
39-
return new Handlebars.SafeString('hsl(' + hsl[0] + ', ' + hsl[1] + '%, ' + hsl[2] + '%)');
39+
var hue = Math.round(hsl[0]/20)*20;
40+
return new Handlebars.SafeString('hsl(' + hue + ', ' + hsl[1] + '%, ' + hsl[2] + '%)');
4041
} else {
4142
var maxRange = parseInt('ffffffffffffffffffffffffffffffff', 16);
4243
var hue = parseInt(hash, 16) / maxRange * 256;

0 commit comments

Comments
 (0)