idolezal commited on
Commit
e2b7486
1 Parent(s): 63daecf

Highlight wins and loses

Browse files
Files changed (1) hide show
  1. server.py +3 -1
server.py CHANGED
@@ -222,7 +222,9 @@ class LeaderboardServer:
222
  for c in df_css:
223
  for i in range(len(df_css.index)):
224
  if x[c].iloc[i] == True:
225
- df_css[c].iloc[i] = 'background-color: lightgreen'
 
 
226
  else:
227
  df_css[c].iloc[i] = ''
228
  return df_css
 
222
  for c in df_css:
223
  for i in range(len(df_css.index)):
224
  if x[c].iloc[i] == True:
225
+ df_css[c].iloc[i] = 'background-color: rgba(0, 255, 0, 0.3);'
226
+ elif x[c].iloc[i] == False:
227
+ df_css[c].iloc[i] = 'background-color: rgba(255, 0, 0, 0.3);'
228
  else:
229
  df_css[c].iloc[i] = ''
230
  return df_css