Console Colours

Robin Grayson (robin@rg-net.demon.co.uk)
Sat, 13 Mar 1999 13:20:34 +0000


This may be a stupid question, but how can I set a gray background colour in
Linux?

I am running kernel 2.2.3

If i use echo -e "\033[30;1m" I end up with a gray foreground, but if I do
echo -e "\033[40;1m" I end up with black b/g bright white f/g.

I can set all the 'bright' foreground colours as follows:

echo -e "\033[30;1m" = Gray
echo -e "\033[31;1m" = Bright Red (Pink)
echo -e "\033[32;1m" = Bright Green
echo -e "\033[33;1m" = Yellow
echo -e "\033[34;1m" = Bright Blue
echo -e "\033[35;1m" = Bright Magenta
echo -e "\033[36;1m" = Bright Cyan
echo -e "\033[37;1m" = Bright White

but if I try these for the background:

echo -e "\033[40;1m" = Black b/g Bright White f/g
echo -e "\033[41;1m" = Red
echo -e "\033[42;1m" = Green
echo -e "\033[43;1m" = Brown
echo -e "\033[44;1m" = Blue
echo -e "\033[45;1m" = Magenta
echo -e "\033[46;1m" = Cyan
echo -e "\033[47;1m" = White

I get the base colours, not the 'bright' version of them.

Hope somebody can help.

Thanks,

Rob.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/