-
Notifications
You must be signed in to change notification settings - Fork 0
/
.colours
123 lines (103 loc) · 2.01 KB
/
.colours
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Colors
end="\033[0m"
black="\033[0;30m"
blackb="\033[1;30m"
white="\033[0;37m"
whiteb="\033[1;37m"
red="\033[0;31m"
redb="\033[1;31m"
green="\033[0;32m"
greenb="\033[1;32m"
yellow="\033[0;33m"
yellowb="\033[1;33m"
blue="\033[0;34m"
blueb="\033[1;34m"
purple="\033[0;35m"
purpleb="\033[1;35m"
lightblue="\033[0;36m"
lightblueb="\033[1;36m"
function black {
echo -e "${black}${1}${end}"
}
function blackb {
echo -e "${blackb}${1}${end}"
}
function white {
echo -e "${white}${1}${end}"
}
function whiteb {
echo -e "${whiteb}${1}${end}"
}
function red {
echo -e "${red}${1}${end}"
}
function redb {
echo -e "${redb}${1}${end}"
}
function green {
echo -e "${green}${1}${end}"
}
function greenb {
echo -e "${greenb}${1}${end}"
}
function yellow {
echo -e "${yellow}${1}${end}"
}
function yellowb {
echo -e "${yellowb}${1}${end}"
}
function blue {
echo -e "${blue}${1}${end}"
}
function blueb {
echo -e "${blueb}${1}${end}"
}
function purple {
echo -e "${purple}${1}${end}"
}
function purpleb {
echo -e "${purpleb}${1}${end}"
}
function lightblue {
echo -e "${lightblue}${1}${end}"
}
function lightblueb {
echo -e "${lightblueb}${1}${end}"
}
function colors {
black "black"
blackb "blackb"
white "white"
whiteb "whiteb"
red "red"
redb "redb"
green "green"
greenb "greenb"
yellow "yellow"
yellowb "yellowb"
blue "blue"
blueb "blueb"
purple "purple"
purpleb "purpleb"
lightblue "lightblue"
lightblueb "lightblueb"
}
function colortest {
if [[ -n "$1" ]]; then
T="$1"
fi
T='gYw' # The test text
echo -e "\n 40m 41m 42m 43m\
44m 45m 46m 47m";
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
'1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
' 36m' '1;36m' ' 37m' '1;37m';
do FG=${FGs// /}
echo -en " $FGs \033[$FG $T "
for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
do echo -en "$EINS \033[$FG\033[$BG $T \033[0m";
done
echo;
done
echo
}