-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcolors.py
62 lines (44 loc) · 875 Bytes
/
colors.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import platform, os
try:
if platform.system() == 'Windows':
os.system('cls')
else:
os.system('clear')
except:
pass
# Foreground colors
def black():
return '\u001b[30;1m'
def red():
return '\u001b[31;1m'
def green():
return '\u001b[32;1m'
def yellow():
return '\u001b[33;1m'
def blue():
return '\u001b[34;1m'
def magenta():
return '\u001b[35;1m'
def cyan():
return '\u001b[36;1m'
def white():
return '\u001b[37;1m'
def reset():
return '\u001b[0m'
# Background colors
def b_black():
return '\u001b[40;1m'
def b_red():
return '\u001b[41;1m'
def b_green():
return '\u001b[42;1m'
def b_yellow():
return '\u001b[43;1m'
def b_blue():
return '\u001b[44;1m'
def b_magenta():
return '\u001b[45;1m'
def b_cyan():
return '\u001b[46;1m'
def b_white():
return '\u001b[47;1m'