How To Be Mastering Command Prompt #11 COLOR

COLOR is used to set the default console foreground and background colors.

Formula:

COLOR [attr]

Description:
Attr    Specifies color attribute of console output

Color attributes are specified by two hex digits, the first corresponds to the background, the second the foreground. Digit:
0  = Black             8  = Gray
1  = Blue              9  = Light Blue
2  =  Green            A  = Light Green
3  = Aqua              B  = Light Aqua
4  = Red               C  = Light Red
5  = Purple            D  = Light Purple
6  = Yellow            E  = Light Yellow
7  = White             F  = Bright White

If no arguments given, this command restore the color to what it was when cmd.exe started.

For example:
Set background color to blue and foreground the light yellow -> COLOR 1E


Picture 1. Bacground the blue (1) and foreground the bright yellow (E)





 
Set background color to red and foreground the light blue -> COLOR 49
 

Picture 2. Blue in red


Just that, I hope this tutorial is useful for you. Thank for your visiting. Please type your      comments for this tutorial..

No comments:

Post a Comment