5 def inner(text
, rl
=False):
7 Every raw_input with color sequences should be called with
8 rl=True to avoid readline messed up the length calculation
12 return "\001\033[%sm\002%s\001\033[0m\002" % (c
, text
)
14 return "\033[%sm%s\033[0m" % (c
, text
)
22 def inner(text
, rl
=False):
24 Every raw_input with color sequences should be called with
25 rl=True to avoid readline messed up the length calculation
29 return "\001\033[38;5;%sm\002%s\001\033[0m\002" % (c
, text
)
31 return "\033[38;5;%sm%s\033[0m" % (c
, text
)
38 default
= basic_color('39')
39 black
= basic_color('30')
40 red
= basic_color('31')
41 green
= basic_color('32')
42 yellow
= basic_color('33')
43 blue
= basic_color('34')
44 magenta
= basic_color('35')
45 cyan
= basic_color('36')
46 grey
= basic_color('90')
47 light_red
= basic_color('91')
48 light_green
= basic_color('92')
49 light_yellow
= basic_color('93')
50 light_blue
= basic_color('94')
51 light_magenta
= basic_color('95')
52 light_cyan
= basic_color('96')
53 white
= basic_color('97')
56 16 basic colors on background
58 on_default
= basic_color('49')
59 on_black
= basic_color('40')
60 on_red
= basic_color('41')
61 on_green
= basic_color('42')
62 on_yellow
= basic_color('43')
63 on_blue
= basic_color('44')
64 on_magenta
= basic_color('45')
65 on_cyan
= basic_color('46')
66 on_grey
= basic_color('100')
67 on_light_red
= basic_color('101')
68 on_light_green
= basic_color('102')
69 on_light_yellow
= basic_color('103')
70 on_light_blue
= basic_color('104')
71 on_light_magenta
= basic_color('105')
72 on_light_cyan
= basic_color('106')
73 on_white
= basic_color('107')