Filter: better colour selection for 'rainbow'

This commit is contained in:
James Lu 2014-12-20 23:17:27 -08:00 committed by GLolol
parent d06d744f11
commit 3f60b28739

View File

@ -401,7 +401,8 @@ class Filter(callbacks.Plugin):
""" """
if sys.version_info[0] < 3: if sys.version_info[0] < 3:
text = text.decode('utf-8') text = text.decode('utf-8')
colors = utils.iter.cycle(['04', '07', '08', '03', '02', '12', '06']) colors = utils.iter.cycle(['05', '04', '07', '08', '09', '03', '11',
'10', '12', '02', '06', '13'])
L = [self._color(c, fg=next(colors)) for c in text] L = [self._color(c, fg=next(colors)) for c in text]
if sys.version_info[0] < 3: if sys.version_info[0] < 3:
L = [c.encode('utf-8') for c in L] L = [c.encode('utf-8') for c in L]