Colors
You can echo out colors on the terminal which can be handy for debugging or just for fun. Here are some examples:
echo -e "\e[30mBlack\e[0m"
echo -e "\e[31mRed\e[0m"
echo -e "\e[32mGreen\e[0m"
echo -e "\e[33mYellow\e[0m"
echo -e "\e[34mBlue\e[0m"
echo -e "\e[35mMagenta\e[0m"
echo -e "\e[36mCyan\e[0m"
echo -e "\e[37mWhite\e[0m"
You can also use the following to change the background color:
echo -e "\e[41mRed\e[0m"
echo -e "\e[42mGreen\e[0m"
echo -e "\e[43mYellow\e[0m"
echo -e "\e[44mBlue\e[0m"
echo -e "\e[45mMagenta\e[0m"
echo -e "\e[46mCyan\e[0m"
echo -e "\e[47mWhite\e[0m"
You can also use the following to change the text style:
echo -e "\e[1mBold\e[0m"
echo -e "\e[4mUnderline\e[0m"
echo -e "\e[5mBlink\e[0m"
echo -e "\e[7mInverse\e[0m"
You can also combine the colors and styles:
echo -e "\e[1;31mBold Red\e[0m"
echo -e "\e[4;32mUnderline Green\e[0m"
echo -e "\e[5;33mBlink Yellow\e[0m"
echo -e "\e[7;34mInverse Blue\e[0m"