Changes between Version 2 and Version 5 of Ticket #3205


Ignore:
Timestamp:
May 17, 2015, 9:25:51 PM (9 years ago)
Author:
elexis
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3205

    • Property Summary [PATCH] Too dark colors for playernames in multiplayer lobby[PATCH] Too dark colors for playernames in multiplayer lobby and gamesetup_chat
  • Ticket #3205 – Description

    v2 v5  
    1 A quick fix enlighting too dark colors by increasing the minimum lightness.
     1Some players with short names get dark blue as the color for their nickname. Since the names are short and the color is very dark on dark background, you have a hard time reading that playername without zooming in / going closer to the screen.
    22
     3This can be fixed easily by increasing the minimum brightness of the player color chosen.
    34
    4 {{{
    5 >> Math.max(0.7, l)
     5This patch enlightens too dark colors by increasing the minimum lightness:
     6attachment:t3205_enlighten_too_dark_chat_colors.patch:ticket:3205
    67
    7 
    8 --- lobby.js    2015-04-29 00:54:14.627665464 +0200
    9 +++ lobby_fix.js        2015-04-29 01:31:50.552725876 +0200
    10 @@ -1017,7 +1017,7 @@
    11         // us much more variety if we generate in RGB. Unfortunately, enforcing that RGB values are a certain lightness is very difficult, so
    12         // we convert to HSL to do the computation. Since our GUI code only displays RGB colors, we have to convert back.
    13         var [h, s, l] = rgbToHsl(hash >> 24 & 0xFF, hash >> 16 & 0xFF, hash >> 8 & 0xFF);
    14 -       return hslToRgb(h, s, Math.max(0.4, l)).join(" ");
    15 +       return hslToRgb(h, s, Math.max(0.7, l)).join(" ");
    16  }
    17  
    18  function repeatString(times, string) {
    19 
    20 }}}
    21 
    22 
    23 Images:
    24 
    25 Before [[Image(http://trac.wildfiregames.com/attachment/ticket/3205/before.png)]]
    26 After [[Image(http://trac.wildfiregames.com/attachment/ticket/3205/screenshot0002.png)]]
     8Here a comparison (left without patch, right with patch):
     9[[Image(ticket:3205:comparison.png)]]