Ticket #3205: lobby_color_fix.patch
File lobby_color_fix.patch, 611 bytes (added by , 9 years ago) |
---|
-
.js
old new 1017 1017 // us much more variety if we generate in RGB. Unfortunately, enforcing that RGB values are a certain lightness is very difficult, so 1018 1018 // we convert to HSL to do the computation. Since our GUI code only displays RGB colors, we have to convert back. 1019 1019 var [h, s, l] = rgbToHsl(hash >> 24 & 0xFF, hash >> 16 & 0xFF, hash >> 8 & 0xFF); 1020 return hslToRgb(h, s, Math.max(0. 4, l)).join(" ");1020 return hslToRgb(h, s, Math.max(0.7, l)).join(" "); 1021 1021 } 1022 1022 1023 1023 function repeatString(times, string) {