-
Notifications
You must be signed in to change notification settings - Fork 0
/
shellcolors.py
executable file
·89 lines (59 loc) · 2.14 KB
/
shellcolors.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/usr/bin/env python
from colors import colorize
#==========================================================================
# Foreground (without prefixes)
#==========================================================================
def black(string):
return colorize(['FG_BLACK'], str(string))
def red(string):
return colorize(['FG_RED'], str(string))
def green(string):
return colorize(['FG_GREEN'], str(string))
def yellow(string):
return colorize(['FG_YELLOW'], str(string))
def blue(string):
return colorize(['FG_BLUE'], str(string))
def magenta(string):
return colorize(['FG_MAGENTA'], str(string))
def cyan(string):
return colorize(['FG_CYAN'], str(string))
def white(string):
return colorize(['FG_WHITE'], str(string))
#==========================================================================
# Foreground (with prefixes)
#==========================================================================
def fg_black(string):
return colorize(['FG_BLACK'], str(string))
def fg_red(string):
return colorize(['FG_RED'], str(string))
def fg_green(string):
return colorize(['FG_GREEN'], str(string))
def fg_yellow(string):
return colorize(['FG_YELLOW'], str(string))
def fg_blue(string):
return colorize(['FG_BLUE'], str(string))
def fg_magenta(string):
return colorize(['FG_MAGENTA'], str(string))
def fg_cyan(string):
return colorize(['FG_CYAN'], str(string))
def fg_white(string):
return colorize(['FG_WHITE'], str(string))
#==========================================================================
# Background
#==========================================================================
def bg_black(string):
return colorize(['BG_BLACK'], str(string))
def bg_red(string):
return colorize(['BG_RED'], str(string))
def bg_green(string):
return colorize(['BG_GREEN'], str(string))
def bg_yellow(string):
return colorize(['BG_YELLOW'], str(string))
def bg_blue(string):
return colorize(['BG_BLUE'], str(string))
def bg_magenta(string):
return colorize(['BG_MAGENTA'], str(string))
def bg_cyan(string):
return colorize(['BG_CYAN'], str(string))
def bg_white(string):
return colorize(['BG_WHITE'], str(string))