-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolors.sh
More file actions
executable file
·11 lines (11 loc) · 2.17 KB
/
colors.sh
File metadata and controls
executable file
·11 lines (11 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env sh
# Bash snippets to color your test in shel. You can export it or just copy/paste to your code.
# Source https://github.com/rumatoest/shelpers
#
#Color functions constructed from prefix and color index: c1 "Red"; bg4 "Blue bg"
#COLORS codes: 0-black/gray, 1-red, 2-green, 3-orange/yellow, 4-blue, 5-purple, 6-cyan, 7-gray/white
Pf(){ printf "\033[$1\033[0m";};
#COLORS prefixes: c*-color, b*-bold, i*-italic, u*-underline, bg*-backround
c0(){ Pf "30m$*";};c1(){ Pf "31m$*";};c2(){ Pf "32m$*";};c3(){ Pf "33m$*";};c4(){ Pf "34m$*";};c5(){ Pf "35m$*";};c6(){ Pf "36m$*";};c7(){ Pf "37m$*";};b0(){ Pf "1;30m$*";};b1(){ Pf "1;31m$*";};b2(){ Pf "1;32m$*";};b3(){ Pf "1;33m$*";};b4(){ Pf "1;34m$*";};b5(){ Pf "1;35m$*";};b6(){ Pf "1;36m$*";};b7(){ Pf "1;37m$*";};i0(){ Pf "3;30m$*";};i1(){ Pf "3;31m$*";};i2(){ Pf "3;32m$*";};i3(){ Pf "3;33m$*";};i4(){ Pf "3;34m$*";};i5(){ Pf "3;35m$*";};i6(){ Pf "3;36m$*";};i7(){ Pf "3;37m$*";};u0(){ Pf "4;30m$*";};u1(){ Pf "4;31m$*";};u2(){ Pf "4;32m$*";};u3(){ Pf "4;33m$*";};u4(){ Pf "4;34m$*";};u5(){ Pf "4;35m$*";};u6(){ Pf "4;36m$*";};u7(){ Pf "4;37m$*";};bg0(){ Pf "40m$*";};bg1(){ Pf "41m$*";};bg2(){ Pf "42m$*";};bg3(){ Pf "43m$*";};bg4(){ Pf "44m$*";};bg5(){ Pf "45m$*";};bg6(){ Pf "46m$*";};bg7(){ Pf "47m$*";};
#HIGH colors prefixes: ch*-color, bh*-bold, ih*-italic, uh*-underline, bgh*-background
ch0(){ Pf "90m$*";};ch1(){ Pf "91m$*";};ch2(){ Pf "92m$*";};ch3(){ Pf "93m$*";};ch4(){ Pf "94m$*";};ch5(){ Pf "95m$*";};ch6(){ Pf "96m$*";};ch7(){ Pf "97m$*";};bh0(){ Pf "1;90m$*";};bh1(){ Pf "1;91m$*";};bh2(){ Pf "1;92m$*";};bh3(){ Pf "1;93m$*";};bh4(){ Pf "1;94m$*";};bh5(){ Pf "1;95m$*";};bh6(){ Pf "1;96m$*";};bh7(){ Pf "1;97m$*";};ih0(){ Pf "3;90m$*";};ih1(){ Pf "3;91m$*";};ih2(){ Pf "3;92m$*";};ih3(){ Pf "3;93m$*";};ih4(){ Pf "3;94m$*";};ih5(){ Pf "3;95m$*";};ih6(){ Pf "3;96m$*";};ih7(){ Pf "3;97m$*";};uh0(){ Pf "4;90m$*";};uh1(){ Pf "4;91m$*";};uh2(){ Pf "4;92m$*";};uh3(){ Pf "4;93m$*";};uh4(){ Pf "4;94m$*";};uh5(){ Pf "4;95m$*";};uh6(){ Pf "4;96m$*";};uh7(){ Pf "4;97m$*";};bgh0(){ Pf "100m$*";};bgh1(){ Pf "101m$*";};bgh2(){ Pf "102m$*";};bgh3(){ Pf "103m$*";};bgh4(){ Pf "104m$*";};bgh5(){ Pf "105m$*";};bgh6(){ Pf "106m$*";};bgh7(){ Pf "107m$*";}