color

最後更新: 2016-10-03

 

NOTE1: The -e option of the echo command enable the parsing of the escape sequences.

It can be a good idea to add it at the end of each colored text. ;)

In Bash, the <Esc> character can be obtained with the following syntaxes:

    \e
    \033
    \x1B

# Color

echo -e "Default \e[39mDefault"   

echo -e "Default \e[91mLight red"
echo -e "Default \e[93mLight yellow"
echo -e "Default \e[94mLight blue"
echo -e "Default \e[92mLight green"
echo -e "Default \e[96mLight cyan"
echo -e "Default \e[95mLight magenta"
echo -e "Default \e[97mWhite"

# Reset all attributes

The ”\e[0m” sequence removes all attributes (formatting and colors)

echo -e "\e[0mNormal Text"