Changes between Version 2 and Version 5 of Ticket #3205
- Timestamp:
- May 17, 2015, 9:25:51 PM (9 years ago)
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.1 Some 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. 2 2 3 This can be fixed easily by increasing the minimum brightness of the player color chosen. 3 4 4 {{{ 5 >> Math.max(0.7, l) 5 This patch enlightens too dark colors by increasing the minimum lightness: 6 attachment:t3205_enlighten_too_dark_chat_colors.patch:ticket:3205 6 7 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)]] 8 Here a comparison (left without patch, right with patch): 9 [[Image(ticket:3205:comparison.png)]]