Les couleurs dans le bash
YY=48
echo "\E[XX;YYm"
echo -en " \E[01;${YY}m" ; echo -n "01 $YY"; tput sgr0; echo "Gras"
echo -en " \E[02;${YY}m" ; echo -n "02 $YY"; tput sgr0; echo "Estompe (Gris clair)"
echo -en " \E[04;${YY}m" ; echo -n "04 $YY"; tput sgr0; echo "Souligne"
echo -en " \E[07;${YY}m" ; echo -n "07 $YY"; tput sgr0; echo "Video Inverse"
echo -en " \E[08;${YY}m" ; echo -n "08 $YY"; tput sgr0; echo "Invisible"
echo -en " \E[09;${YY}m" ; echo -n "09 $YY"; tput sgr0; echo "Barre"
echo -en " \E[30;${YY}m" ; echo -n "30 $YY"; tput sgr0; echo "Noir"
echo -en " \E[31;${YY}m" ; echo -n "31 $YY"; tput sgr0; echo "Rouge"
echo -en " \E[32;${YY}m" ; echo -n "32 $YY"; tput sgr0; echo "Vert"
echo -en " \E[33;${YY}m" ; echo -n "33 $YY"; tput sgr0; echo "Orange"
echo -en " \E[34;${YY}m" ; echo -n "34 $YY"; tput sgr0; echo "Bleu"
echo -en " \E[35;${YY}m" ; echo -n "35 $YY"; tput sgr0; echo "Magenta"
echo -en " \E[36;${YY}m" ; echo -n "36 $YY"; tput sgr0; echo "Cyan"
echo -en " \E[37;${YY}m" ; echo -n "37 $YY"; tput sgr0; echo "Gris"
echo -en " \E[38;${YY}m" ; echo -n "38 $YY"; tput sgr0; echo "Souligne"
echo -en " \E[40;${YY}m" ; echo -n "40 $YY"; tput sgr0; echo "Fond Noir"
echo -en " \E[41;${YY}m" ; echo -n "41 $YY"; tput sgr0; echo "Fond Rouge"
echo -en " \E[42;${YY}m" ; echo -n "42 $YY"; tput sgr0; echo "Fond Vert"
echo -en " \E[43;${YY}m" ; echo -n "43 $YY"; tput sgr0; echo "Fond Orange"
echo -en " \E[44;${YY}m" ; echo -n "44 $YY"; tput sgr0; echo "Fond Bleu Marine"
echo -en " \E[45;${YY}m" ; echo -n "45 $YY"; tput sgr0; echo "Fond Violet"
echo -en " \E[46;${YY}m" ; echo -n "46 $YY"; tput sgr0; echo "Fond Bleu"
echo -en " \E[47;${YY}m" ; echo -n "47 $YY"; tput sgr0; echo "Fond Gris"
echo -en " \E[48;${YY}m" ; echo -n "48 $YY"; tput sgr0; echo "Fond Blanc"
echo -en " \E[49;${YY}m" ; echo -n "49 $YY"; tput sgr0; echo "Caracteres en noir"
Les caractères sont toujours écrit en noir dans le cas d'un fond de couleur.Les fonds (codes 40 a 49) sont à mettre a la place du $YY dans le premier echo.