Skip to content

Commit

Permalink
Fix hashing, AND was not the right operation
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena committed Dec 7, 2018
1 parent b453f53 commit 4c2f95b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/galaxy/scripts/utils/utils.js
Expand Up @@ -424,7 +424,7 @@ function hslToRgb(h, s, l){

export function generateTagStyle(tag) {
var hash = hashFnv32a(tag);
var hue = (hash >> 4) & 360;
var hue = Math.abs((hash >> 4) % 360);
var lightnessOffset = 75;
var lightness = lightnessOffset + (hash & 0xf);
var bgColor = `hsl(${hue}, 100%, ${lightness}%)`;
Expand Down

0 comments on commit 4c2f95b

Please sign in to comment.