Ticket #3205: lobby_color_fix.patch

File lobby_color_fix.patch, 611 bytes (added by fpre_O_O_O_O_O_O, 9 years ago)

quick fix for dark colors

  • .js

    old new  
    10171017    // us much more variety if we generate in RGB. Unfortunately, enforcing that RGB values are a certain lightness is very difficult, so
    10181018    // we convert to HSL to do the computation. Since our GUI code only displays RGB colors, we have to convert back.
    10191019    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(" ");
    10211021}
    10221022
    10231023function repeatString(times, string) {