Knowledgebase

How to Change the CMD Color Easily?

Are you tired of staring at the boring black-and-white Command Prompt (CMD) screen?

Whether you spend hours coding, running scripts, or just exploring Windows, a little splash of color can make your CMD more fun and even easier on the eyes. 

The good news? 

Changing CMD color is super easy, and there are multiple ways to do it! 

In this detailed guide, we will cover all methods step by step to change the CMD color easily.

Let’s get started!

What is CMD Color and Why Change It

The Command Prompt (CMD) is a Windows program that allows you to run commands and scripts. By default, CMD uses a black background with white text. Changing the color can help:

  • It reduces eye strain during long sessions.
  • It highlights important commands or outputs.
  • It adds a personalized touch to your workflow.
  • It makes your coding or automation tasks visually organized.

Also Read: How can you connect to a Remote Desktop using CMD?


Methods to change the CMD Color

Method 1: Using the CMD color Command

The simplest way to change the CMD color is to use the built-in color command.

Here are the steps:

➔ Open CMD by pressing Win + R, typing ‘cmd’, and hitting Enter.

➔ You have to type the following command and press Enter:

Copied!
color [attr]

[attr] is a two-character code: the first character is the background color, and the second character is the text color.

Here are the color codes:

Code

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

Understand with an example:

Copied!
color 1A

Which means:

★ Background: Blue (1)

★ Text: Light Green (A)

Note: To reset CMD to default colors, type color and hit Enter without any code.

Also Read: Guide to Check Node Version in Windows CMD


Method 2: Changing CMD Colors Permanently via Properties

If you want your favourite CMD colors to stay forever:

➔ Firstly, open CMD.

➔ On the top, right-click the title bar and select ‘Properties.’

cmd properties

➔ Go to the ‘Colors’ tab.

command prompt color properties

➔ In that, you need to select your preferred Screen Text and screen background colors.

➔ Once done, click ‘OK’ to save changes.

click on ok

Now, every time you open the Command Prompt, your colors will be applied automatically.


Also Read: Guide to Check MongoDB Version in Windows CMD


Method 3: Using Batch Files for Quick Color Change

You can create a small batch file to launch CMD with your favourite colors instantly.

Below are the steps:

➔ Open Notepad.

➔ In that, you have to paste the following code:

Copied!
@echo off
color 2E
cmd

This example sets the background to Green (2) and text to Light Yellow (E).

➔ You have to save the file as ‘CustomCMD.bat.’

➔ Now, you have to double-click the file to open CMD with your custom colors.


Also Read: How to Check Angular Version in Windows CMD?


Pro Tips for CMD Color Customization

➔ Avoid clashing colors, such as bright text on a bright background, which is hard to read.

➔ Stick to dark backgrounds with light text for long coding sessions.

➔ Use batch files or scripts if you frequently switch between different workflows.

Conclusion

Changing CMD color isn’t just about aesthetics; it’s about productivity, comfort, and personalizing your workflow. Whether you use the simple color command, permanent settings in CMD or batch files, you have full control over your environment.

So go ahead, pick your favourite color combo, and make your CMD as lively as your coding skills!