3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00

relay_clientbot: remove dark blue from the random colours list

It's difficult to read on clients configurated to use a dark background. Reported by @MrBenC
This commit is contained in:
James Lu 2017-07-01 18:06:50 -07:00
parent 963d5e11cc
commit 60788e4ba5

View File

@ -25,8 +25,7 @@ def color_text(s):
"""
Returns a colorized version of the given text based on a simple hash algorithm.
"""
colors = ('02', '03', '04', '05', '06', '07', '08', '09', '10', '11',
'12', '13', '15')
colors = ('03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '15')
hash_output = hash(s.encode())
num = hash_output % len(colors)
return "\x03%s%s\x03" % (colors[num], s)