Visit Website

Windows CMD COLOR Command Explained | Change Command Prompt Colors Like a Pro

Learn how to use the Windows CMD COLOR command. Change Command Prompt text and background colors with easy examples and color codes.

The COLOR command is one of the simplest and most fun commands in Windows CMD (Command Prompt). It allows you to change the background color and text color of the Command Prompt window instantly.

Whether you're learning CMD or creating batch scripts, understanding the COLOR command can make your console look more professional and easier to read.

This beginner-friendly guide explains everything you need to know.


📌 What is the COLOR Command?

The COLOR command changes the default foreground (text) and background colors of the Command Prompt window.

Basic syntax:

COLOR [attr]

Here, attr stands for Color Attribute.


🎨 Understanding Color Attributes

The COLOR command uses two hexadecimal characters:

COLOR fc

First Character = Background Color

The first character controls the background color.

Second Character = Text Color

The second character controls the text (foreground) color.


🧩 Example

Command:

COLOR fc

Meaning:

CharacterMeaning
fBright White Background
cLight Red Text

Result:

👉 Light Red Text on White Background


🎯 Common Color Codes

CodeColor
0Black
1Blue
2Green
3Aqua
4Red
5Purple
6Yellow
7White
8Gray
9Light Blue
ALight Green
BLight Aqua
CLight Red
DLight Purple
ELight Yellow
FBright White

🚀 Popular COLOR Command Examples

Green Hacker Style

COLOR 0A

✔ Black Background
✔ Light Green Text


Red Text on Black

COLOR 0C

✔ Black Background
✔ Light Red Text


Yellow Text on Blue

COLOR 1E

✔ Blue Background
✔ Light Yellow Text


White Text on Black (Default Style)

COLOR 07

✔ Black Background
✔ White Text


🔄 Restore Default CMD Colors

To return CMD to its default colors:

COLOR 07

This is the standard Windows Command Prompt appearance.


💻 Using COLOR in Batch Files

You can also use COLOR inside BAT scripts.

Example:

@echo off
color 0A
echo Welcome to CodeSardar!
pause

This creates a green-text console effect.


⚠️ Important Rule

The background and text colors cannot be the same.

Example:

COLOR 00

or

COLOR FF

These combinations make text invisible and may not work properly.


🎨 Best Color Combinations

CommandAppearance
COLOR 0AGreen Hacker Style
COLOR 0CRed Alert Style
COLOR 1FWhite on Blue
COLOR E0Black on Yellow
COLOR F1Blue Text on White

📝 Final Words

The COLOR command is a simple but powerful CMD feature that allows you to customize the appearance of Command Prompt instantly. Whether you're learning Windows commands or creating batch scripts, using colors can make your CMD window look cleaner, more professional, and more fun.

Experiment with different color combinations and create your own console style.

For more Windows CMD tricks and tutorials, visit CodeSardar.


❓ Frequently Asked Questions 

Q1. What does COLOR 0A mean?
It means Black Background with Light Green Text.

Q2. Can I use COLOR in BAT files?
Yes, the COLOR command works perfectly in batch scripts.

Q3. How do I reset CMD colors?
Use:

COLOR 07

to restore the default appearance.


Complete Video Guide/Tutorial


Post a Comment

Have a question or feedback? Share it below! Please avoid spam and stay respectful.
Visit Website
Visit Website