Browse Source

Lighter usernames for dark theme

shortcutme 5 years ago
parent
commit
9a9361ac5c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      js/utils/Text.coffee

+ 4 - 1
js/utils/Text.coffee

@@ -8,7 +8,10 @@ class Text
 		for i in [0..text.length-1]
 			hash = text.charCodeAt(i) + ((hash << 5) - hash)
 		color = '#'
-		return "hsl(" + (hash % 360) + ",30%,50%)"
+		if Page.server_info?.user_settings?.theme == "dark"
+			return "hsl(" + (hash % 360) + ",55%,65%)"
+		else
+			return "hsl(" + (hash % 360) + ",30%,50%)"
 
 
 	renderMarked: (text, options={}) ->