Change the Color of Command Prompt

Changing Text and Background Color of Command Prompt

Windows may have a great, user-friendly Graphical User Interface, but some people just like to do things the old school way – using the old command-line interface. Windows also has two different command-line utilities now, the Windows PowerShell and the Windows Command Prompt. Microsoft even introduced a new CLI called the Windows Terminal. It’s not an alternative for CMD or PowerShell, instead, it’s an app that comes with a new interface and allows you to use a bunch of different CLIs using the same interface.

If you’re one of those power users that loves to use command-line utilities, you’re in luck, as in this guide, we are going to cover a bunch of different ways you can tweak your CMD interface to suit better for you. In this guide, you can see how you can change the color of your Command Prompt, both for the foreground (text) as well as the background.

Changing Color

First, you need to open the Command Prompt. You can do it by pressing the Start button and searching for cmd.

Type the following command,

COLOR <color for background><color for text>

For example,

COLOR fc

This will produce light red text on a bright white background. Here is the color encoding scheme,

Color attributes are specified by TWO hex digits -- the first
corresponds to the background; the second the foreground. Each digit
can be any of the following values:

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 you just want to change the color of the text, you can also enter just one hex digit, for example,

COLOR c

That’s it. We have added a couple of combinations you can try below,