Table of Contents
Color Command in Windows is easier to understand when the core ideas are paired with practical examples. The sections below explain the topic clearly, highlight useful steps, and point out details that can prevent common errors.
The color command changes the foreground and background colors in the Command Prompt window for the current session. If used without parameters, the color command restores the default foreground and background colors of the Command Prompt window.
For an example of how to use this command, please see the Example below.
Syntax
color [[ ]]
Parameters
ParametersDescription Specifies the background color. Specify foreground color. /? Show help at the command prompt.Note
The following table lists valid hexadecimal digits that you can use as values for B and F.
Value Color 0 Black 1 Blue 2 Green 3 Mint Green 4 Red 5 Purple 6 Yellow 7 White 8 Gray 9 Light Blue A Light Green B Light mint Green C Light red D Light purple E Light yellow F Bright white- Do not use space characters between B and F.
- If you specify a hexadecimal digit, the corresponding color will be used as the foreground color and the background color is set to the default color.
- To set the default Command Prompt color window, click on the upper left corner of the Command Prompt window, click Defaults , click the Colors tab , then select the colors you want to use for Screen Text and Screen Background .
- If B and F are the same, the color command sets ERRORLEVEL to 1 and no changes are made to the background color or foreground color.
As an example,
To change the background color of the Command Prompt window to gray and the foreground color of the Command Prompt window to red, enter:
color 84
- Cmdkey command in Windows
- Clip command in Windows
- The chkntfs command in Windows
FAQ
What should you know about syntax color [[ ]] Parameters ParametersDescription Specifies the background color. Specify foreground color. /? Show help at the command prompt. Note?
The following table lists valid hexadecimal digits that you can use as values for B and F.
What should you know about as an example,?
To change the background color of the Command Prompt window to gray and the foreground color of the Command Prompt window to red, enter:
What is Color Command in Windows?
The color command changes the foreground and background colors in the Command Prompt window for the current session.
Reader Comments 0
Sign in with email or Google to join the discussion.