#!/usr/bin/env bash # Colorize. if [ $# -ne 1 ] then echo "Usage: `basename $0` " exit fi export CORE="" case $1 in [Bb]lack) CORE="0;30" ;; [Dd]ark[gG]ray) CORE="1;30" ;; [Rr]ed) CORE="0;31" ;; [Ll]ight[rR]ed) CORE="1;31" ;; [Gg]reen) CORE="0;32" ;; [Ll]ight[gG]reen) CORE="1;32" ;; [Bb]rown) CORE="0;33" ;; [Yy]ellow) CORE="1;33" ;; [Bb]lue) CORE="0;34" ;; [Ll]ight[bB]lue) CORE="1;34" ;; [Pp]urple) CORE="0;35" ;; [Ll]ight[pP]urple) CORE="1;35" ;; [Cc]yan) CORE="0;36" ;; [Ll]ight[cC]yan) CORE="1;36" ;; [Ll]ight[gG]ray) CORE="0;37" ;; [Ww]hite) CORE="1;37" ;; esac echo -en "\e[${CORE}m"