#!/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