In this article, we will see how to customize the font color and the background color in the Command Prompt window in Windows 10. It is possible to change it temporary or permanently, depending on what you need.
Advertisеment
The Command Prompt is a built-in tool of the Windows operating system available since its first versions. It allows the user to use classic DOS commands (but not all of them in modern Windows versions) as well as Win32 console commands and apps. It is a mature, powerful and extremely useful tool for advanced Windows users. While Microsoft is emphasizing PowerShell in recent builds of Windows 10, the good old cmd.exe app is still widely used in the OS.
There is a trick which will allow you to change the background color and the color of the font in the Command prompt. It can be done with a simple Registry tweak. I will show how it can be done in Windows 10, however, the tweak works in all older versions of Windows starting from Windows NT 4.0.
To change colors in Command Prompt in Windows 10, do the following.
- Open the Registry Editor app.
- Go to the following Registry key.
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
See how to go to a Registry key with one click.
- On the right, modify or create a new 32-Bit DWORD value "DefaultColor". Note: Even if you are running 64-bit Windows, you must still create a 32-bit DWORD value.
Its value specifies the background and foreground colors of the Command prompt window. Its value should be set in hexadecimals and include two color codes for background and foreground respectively.
For example, a value data of 04 will set a black background color with red letters. - The color code reference is as follows:
0 black
1 blue
2 green
3 cyan
4 red
5 magenta
6 yellow/brown
7 white
8 gray
9 bright blue
A bright green
B bright cyan
C bright red
D bright magenta
E bright yellow
F white - To make the changes done by the Registry tweak take effect, you need to re-open the command prompt.
The tweak described above will change the command prompt's color permanently. To temporarily change colors in a single open instance of cmd.exe, you can use the color command.
The syntax of the command is as follows:
color Color_code_of_backgroundColor_code_of_foreground
Use the same color codes from the reference above.
For example, to set a white background color with blue letters, issue the command:
color F1
The result will be as follows:
That's it. Other articles of interest:
- Get New Color Scheme in Command Prompt in Windows 10
- Open Command Prompt at Boot in Windows 10
- Add Command Prompt As Administrator Context Menu in Windows 10
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!
Advertisеment