Color command in Windows

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
  1. Do not use space characters between B and F.
  2. 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.
  3. 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 .
  4. 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.

For 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 

To change the foreground color of the Command Prompt window to light yellow, enter:

 color e 

Note:

In this example, the background is set to the default color because only one hexadecimal digit is specified.

See more:

  1. Cmdkey command in Windows
  2. Clip command in Windows
  3. The chkntfs command in Windows
5 ★ | 1 Vote

May be interested

  • What is a disk signature? Fix disk signature conflict errorPhoto of What is a disk signature?  Fix disk signature conflict error
    a disk signature is a unique, defined number of a hard drive or data storage device, stored as part of the master boot record (mbr).
  • Command mode in WindowsPhoto of Command mode in Windows
    display system status, change system settings or reconfigure port and connected device.
  • The ntfrsutl command in WindowsPhoto of The ntfrsutl command in Windows
    (applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012).
  • Cd command in WindowsPhoto of Cd command in Windows
    the cd command displays the name or changes the current directory. if used only with a drive letter (eg cd c :), the cd command displays the name of the current directory in the specified drive.
  • Openfiles commands in WindowsPhoto of Openfiles commands in Windows
    allows administrators to query, display, or disconnect files and folders that have been opened on the system. in addition, this command can also license or disable the maintain objects list system.
  • Why does Windows use backslashes?Photo of Why does Windows use backslashes?
    modern software has mostly auto-correction functions when you enter the slash incorrectly, so it doesn't matter which slash type you usually use but recognize the difference between the two types of slashes this crossover in windows is sometimes also necessary.