-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtermcolors
executable file
·47 lines (43 loc) · 1.04 KB
/
termcolors
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
#!/usr/bin/bash
# terminal colors print
# info: http://www.pixelbeat.org/docs/terminal_colours/
# info: http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
# info: https://en.wikipedia.org/wiki/File:Xterm_256color_chart.svg
# ANSI 16
echo
for c in {0..7}; do
printf "\e[37;0;48;5;${c}m $c \e[0m"
done
echo -e " ANSI 16"
for c in {8..9}; do
printf "\e[37;0;48;5;${c}m $c \e[0m"
done
for c in {10..15}; do
printf "\e[37;0;48;5;${c}m $c \e[0m"
done
echo -e "\e[0m"
# Color-cube 216 (6x6x6)
echo
for c in {16..21}; do
printf "\e[37;0;48;5;${c}m $c \e[0m"
done
echo -e " Color-cube 216 (6x6x6)"
for c in {22..99}; do
printf "\e[37;0;48;5;${c}m $c \e[0m"
[ $((++j%6)) -eq 0 ] && echo -e "\e[0m"
done
for c in {100..231}; do
printf "\e[37;0;48;5;${c}m $c \e[0m"
[ $((++j%6)) -eq 0 ] && echo -e "\e[0m"
done
# Grayscale
echo
for c in {232..237}; do
printf "\e[37;0;48;5;${c}m $c \e[0m"
done
echo -e " Grayscale 24"
for c in {238..255}; do
printf "\e[37;0;48;5;${c}m $c \e[0m"
[ $((++j%6)) -eq 0 ] && echo -e "\e[0m"
done
echo