Opened 9 years ago

Last modified 8 years ago

#3205 closed defect

[PATCH] Too dark colors for playernames in multiplayer lobby — at Version 2

Reported by: fpre_O_O_O_O_O_O Owned by:
Priority: Should Have Milestone: Alpha 20
Component: Multiplayer lobby Keywords: patch
Cc: Patch:

Description (last modified by fpre_O_O_O_O_O_O)

A quick fix enlighting too dark colors by increasing the minimum lightness.

>> Math.max(0.7, l)


--- lobby.js	2015-04-29 00:54:14.627665464 +0200
+++ lobby_fix.js	2015-04-29 01:31:50.552725876 +0200
@@ -1017,7 +1017,7 @@
 	// us much more variety if we generate in RGB. Unfortunately, enforcing that RGB values are a certain lightness is very difficult, so
 	// we convert to HSL to do the computation. Since our GUI code only displays RGB colors, we have to convert back.
 	var [h, s, l] = rgbToHsl(hash >> 24 & 0xFF, hash >> 16 & 0xFF, hash >> 8 & 0xFF);
-	return hslToRgb(h, s, Math.max(0.4, l)).join(" ");
+	return hslToRgb(h, s, Math.max(0.7, l)).join(" ");
 }
 
 function repeatString(times, string) {

Images:

Before http://trac.wildfiregames.com/attachment/ticket/3205/before.png After http://trac.wildfiregames.com/attachment/ticket/3205/screenshot0002.png

Change History (7)

by fpre_O_O_O_O_O_O, 9 years ago

Attachment: lobby_color_fix.patch added

quick fix for dark colors

comment:1 by elexis, 9 years ago

Description: modified (diff)
Keywords: patch review added
Summary: to dark colors in playernames in multiplayer lobby like dark blue as unreadable[PATCH] Too dark colors for playernames in multiplayer lobby

by elexis, 9 years ago

Attachment: lobby_color_fix_svn.patch added

Same patch but for svn version.

by fpre_O_O_O_O_O_O, 9 years ago

Attachment: screenshot0002.png added

lookslike

by fpre_O_O_O_O_O_O, 9 years ago

Attachment: before.png added

before

comment:2 by fpre_O_O_O_O_O_O, 9 years ago

Description: modified (diff)

by fpre_O_O_O_O_O_O, 9 years ago

new colors for chat (enlighted)

Note: See TracTickets for help on using tickets.