Color
This page is from Microsoft
Updated: January 21, 2005
Syntax
Parameters
Remarks
- The following tables lists valid hexadecimal digits that you can use as the values for F and B.
Value | Color |
0 |
Black |
1 | Blue |
2 | Green |
3 | Aqua |
4 | Red |
5 | Purple |
6 | Yellow |
7 | White |
8 | Gray |
9 | Light blue |
A | Light green |
B | Light aqua |
C | Light red |
D | Light purple |
E | Light yellow |
F | Bright white |
-
Do not use space characters between F and B.
-
If you specify only one hexadecimal digit, the corresponding color is used as the foreground color and the background color is set to black.
-
To set the default Command Prompt window color, click the upper-left corner of the command prompt window, click Defaults, click the Colors tab, and then click the colors that you want to use for the Screen Text and Screen Background.
-
You can use cmd /t:FG to change the Command Prompt window colors for the current session.
-
If the foreground and background colors are the same, the color command sets ERRORLEVEL to one (1).
Examples
To change the Command Prompt window foreground color to red and background to white, type:
color 74
Formatting legend
Format |
Meaning |
Italic |
Information that the user must supply |
Bold |
Elements that the user must type exactly as shown |
Ellipsis (...) |
Parameter that can be repeated several times in a command line |
Between brackets ([]) |
Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} |
Set of choices from which the user must choose only one |
Courier font |
Code or program output |