Useful Commands
Bash
Display ANSI colors with their color-code.
function colormap() {
range_start=${1:-1}
range_end=${2:-255}
for i in $(seq $range_start $range_end); do
echo -en "\e[48;5;${i}m ${(l:3::0:)i} \e[0m "
[[ $((i % 10)) -eq 0 ]] && echo
done
return 0
}
The
colormap
function will print the ANSI colors with codes in your terminal.