-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathprint-colors
More file actions
executable file
·102 lines (89 loc) · 3.87 KB
/
print-colors
File metadata and controls
executable file
·102 lines (89 loc) · 3.87 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
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
#!/bin/bash
# SPDX-FileCopyrightText: 2018 - 2024 sudorook <daemon@nullcodon.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
set -euo pipefail
declare -A COLORS
# Reset
COLORS["Color_Off"]='\033[0m' # Text Reset
# Black
COLORS["Black"]='\033[0;30m' # Regular Colors
COLORS["Black-B"]='\033[1;30m' # Bold
COLORS["Black-U"]='\033[4;30m' # Underline
COLORS["Black-BG"]='\033[40m' # Background
COLORS["Black-I"]='\033[0;90m' # High Intensity
COLORS["Black-BI"]='\033[1;90m' # Bold High Intensity
COLORS["Black-BGI"]='\033[0;100m' # High Intensity backgrounds
# Red
COLORS["Red"]='\033[0;31m' # Regular Colors
COLORS["Red-B"]='\033[1;31m' # Bold
COLORS["Red-U"]='\033[4;31m' # Underline
COLORS["Red-BG"]='\033[41m' # Background
COLORS["Red-I"]='\033[0;91m' # High Intensity
COLORS["Red-BI"]='\033[1;91m' # Bold High Intensity
COLORS["Red-BGI"]='\033[0;101m' # High Intensity backgrounds
# Green
COLORS["Green"]='\033[0;32m' # Regular Colorsn
COLORS["Green-B"]='\033[1;32m' # Bold
COLORS["Green-U"]='\033[4;32m' # Underline
COLORS["Green-BG"]='\033[42m' # Background
COLORS["Green-I"]='\033[0;92m' # High Intensity
COLORS["Green-BI"]='\033[1;92m' # Bold High Intensity
COLORS["Green-BGI"]='\033[0;102m' # High Intensity backgrounds
# Yellow
COLORS["Yellow"]='\033[0;33m' # Regular Colorsw
COLORS["Yellow-B"]='\033[1;33m' # Bold
COLORS["Yellow-U"]='\033[4;33m' # Underline
COLORS["Yellow-BG"]='\033[43m' # Background
COLORS["Yellow-I"]='\033[0;93m' # High Intensity
COLORS["Yellow-BI"]='\033[1;93m' # Bold High Intensity
COLORS["Yellow-BGI"]='\033[0;103m' # High Intensity backgrounds
# Blue
COLORS["Blue"]='\033[0;34m' # Regular Colors
COLORS["Blue-B"]='\033[1;34m' # Bold
COLORS["Blue-U"]='\033[4;34m' # Underline
COLORS["Blue-BG"]='\033[44m' # Background
COLORS["Blue-I"]='\033[0;94m' # High Intensity
COLORS["Blue-BI"]='\033[1;94m' # Bold High Intensity
COLORS["Blue-BGI"]='\033[0;104m' # High Intensity backgrounds
# Purple
COLORS["Purple"]='\033[0;35m' # Regular Colors
COLORS["Purple-B"]='\033[1;35m' # Bold
COLORS["Purple-U"]='\033[4;35m' # Underline
COLORS["Purple-BG"]='\033[45m' # Background
COLORS["Purple-I"]='\033[0;95m' # High Intensity
COLORS["Purple-BI"]='\033[1;95m' # Bold High Intensity
COLORS["Purple-BGI"]='\033[0;105m' # High Intensity backgrounds
# Cyan
COLORS["Cyan"]='\033[0;36m' # Regular Colors
COLORS["Cyan-B"]='\033[1;36m' # Bold
COLORS["Cyan-U"]='\033[4;36m' # Underline
COLORS["Cyan-BG"]='\033[46m' # Background
COLORS["Cyan-I"]='\033[0;96m' # High Intensity
COLORS["Cyan-BI"]='\033[1;96m' # Bold High Intensity
COLORS["Cyan-BGI"]='\033[0;106m' # High Intensity backgrounds
# White
COLORS["White"]='\033[0;37m' # Regular Colors
COLORS["White-B"]='\033[1;37m' # Bold
COLORS["White-U"]='\033[4;37m' # Underline
COLORS["White-BG"]='\033[47m' # Background
COLORS["White-I"]='\033[0;97m' # High Intensity
COLORS["White-BI"]='\033[1;97m' # Bold High Intensity
COLORS["White-BGI"]='\033[0;107m' # High Intensity backgrounds
for KEY in "${!COLORS[@]}"; do
echo -n "${COLORS["${KEY}"]} "
echo -e "${COLORS["${KEY}"]}${KEY}${COLORS[Color_Off]}"
done | sort -V