-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCOLOR_TABLE
More file actions
49 lines (45 loc) · 1.1 KB
/
COLOR_TABLE
File metadata and controls
49 lines (45 loc) · 1.1 KB
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
# Determine if terminal is capable of showing colors
if [[ -t 1 ]] && [[ $(tput colors) -ge 8 ]]; then
# Bold and underline may not show up on all clients
# If something MUST be emphasized, use both
COL_BOLD='\e[1m'
COL_ULINE='\e[4m'
COL_NC='\e[0m'
COL_GRAY='\e[90m'
COL_RED='\e[91m'
COL_GREEN='\e[32m'
COL_YELLOW='\e[33m'
COL_BLUE='\e[94m'
COL_PURPLE='\e[95m'
COL_CYAN='\e[96m'
else
# Provide empty variables for `set -u`
COL_BOLD=""
COL_ULINE=""
COL_NC=""
COL_GRAY=""
COL_RED=""
COL_GREEN=""
COL_YELLOW=""
COL_BLUE=""
COL_PURPLE=""
COL_CYAN=""
fi
# Deprecated variables
COL_WHITE="${COL_BOLD}"
COL_BLACK="${COL_NC}"
COL_LIGHT_BLUE="${COL_BLUE}"
COL_LIGHT_GREEN="${COL_GREEN}"
COL_LIGHT_CYAN="${COL_CYAN}"
COL_LIGHT_RED="${COL_RED}"
COL_URG_RED="${COL_RED}${COL_BOLD}${COL_ULINE}"
COL_LIGHT_PURPLE="${COL_PURPLE}"
COL_BROWN="${COL_YELLOW}"
COL_LIGHT_GRAY="${COL_GRAY}"
COL_DARK_GRAY="${COL_GRAY}"
TICK="[${COL_GREEN}✓${COL_NC}]"
CROSS="[${COL_RED}✗${COL_NC}]"
INFO="[${COL_CYAN}i${COL_NC}]"
QST="[${COL_YELLOW}?${COL_NC}]"
DONE="${COL_GREEN} done!${COL_NC}"
OVER="\\r[K"