blob: 4d74f6baead0d776d70e7f5dda37ec6ae3fe057c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
#
# PRINT COLOURS
#
# DESCRIPTION
# Output 16 or 256 terminal colour codes
#
# ARGS
# 1st arg (optional): print 256 colours
#
if [[ "$1" == "256" ]]; then
for c in {0..255}; do
tput setaf $c
tput setaf $c | cat -v
echo " = $c"
done
else
for c in {0..15}; do
tput setaf $c
tput setaf $c | cat -v
echo " = $c"
done
fi
|