Opened 9 years ago

Last modified 8 years ago

#3205 closed defect

to dark colors in playernames in multiplayer lobby like dark blue as unreadable — at Initial Version

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

...

quick fix like enlighting all colors by max value from 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) {

Change History (1)

by fpre_O_O_O_O_O_O, 9 years ago

Attachment: lobby_color_fix.patch added

quick fix for dark colors

Note: See TracTickets for help on using tickets.