Last Updated :
24 Jun, 2024
Customizing the appearance of your Command Prompt can make your coding or command execution sessions more enjoyable and easier on the eyes. In this guide, we’ll walk you through the process of changing colours in Command Prompt, from altering text colour to adjusting the background for better clarity and personal preference. Whether you want to modify the entire colour scheme or just tweak a few settings, these steps will help you personalize your Command Prompt environment effectively. Get ready to transform the standard black-and-white backdrop into a more vibrant and user-friendly interface.
First, it’s important to know for reference how a default Command Prompt terminal looks like, it looks something like this:
Here, we are going to change the color text and also the background color of cmd. Assume 2 variable x & y which are associated with specific colors.
color xy
‘x‘ represents the color of the Terminal’s background, whereas,
‘y‘ represents the color of the font on the Command Prompt Terminal.
Following the HEX values of the colors supported by Command Prompt:
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
Example 1:
Suppose we want a white background, so after referring to the color table above we will type, ‘f’ in place of ‘x’. Similarly, if we want a light purple colored font, we will type ‘d’ in place of ‘y’. (x & y are the variables we had assumed earlier).
color fd
Example 2:
‘0’ specifies the black color attribute, and since its typed at the place of ‘x’ i.e. it will be applied to background. ‘a’ specifies the light green color attribute, and since its typed at the place of ‘y’ i.e light green attribute will be applied to the font color.
color 0a
Note: To get all the related information on using color command in Command Prompt you can use the following command
color /?
In conclusion, customizing the colors in Command Prompt not only enhances the visual appeal but can also improve usability by making the text easier to read. By adjusting the color settings, you can create a Command Prompt environment that aligns with your preferences and working style. Whether you’re setting a different background color or changing the text color for better contrast, these simple modifications can significantly enrich your experience with Windows Command Prompt.
To change the text and background color in the Command Prompt (cmd), use the `color` command followed by a two-digit code representing the desired foreground and background colors.
color 0A
In this example, `0` sets the background to black and `A` changes the text color to light green.
Understanding CMD Color Scheme
What is the Default CMD Color Palette?
The Command Prompt (CMD) operates on a default color scheme that might not suit everyone’s visual preferences. By default, CMD typically displays white text on a black background. Understanding this color palette is essential when deciding how to customize it for better visibility or aesthetics.
The following color codes represent the default colors available in CMD:
- 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
Importance of Color Customization
Customizing the colors of CMD can significantly enhance readability while helping users avoid eye strain during prolonged sessions. For developers and IT professionals who spend substantial amounts of time in the command-line interface, personalizing the appearance can make a world of difference. Moreover, color customization allows users to create an environment that reflects their unique style, making command-line tasks less monotonous.
Change User in Cmd: Quick Steps for Fast Switching
Using the COLOR Command
Syntax of the COLOR Command
To change colors in CMD, you utilize the `COLOR` command. The syntax for this command is simple:
COLOR [attr]
Here, `[attr]` is a two-digit hexadecimal number. The first digit represents the background color, while the second digit represents the text color.
Understanding Color Attributes
The color attributes are defined by the numeric codes from 0-9 and A-F. The first digit sets the background, and the second digit sets the foreground (text) color:
- Background color codes: 0-9 and A-F
- Text color codes: 0-9 and A-F
For example, to set a green text on a black background, you would use the following commands:
Step-by-Step: Changing CMD Color
Basic Example
To change the color to light green text on a black background, execute the following command:
COLOR 0A
In this command:
- `0` is the background color (black).
- `A` is the text color (light green).
This change will apply immediately.
Advanced Usage
You can also use the `COLOR` command in combination with other commands to change colors temporarily for specific tasks. If you want to run a command, such as `ping`, with a unique color, you can execute:
COLOR 1F
ping 127.0.0.1
COLOR 07
In this example:
- `1F` changes the text to bright white on a blue background for just the duration of the command.
- The last line resets the colors back to the defaults (gray text on a black background).
Permanent CMD Color Changes
Modifying CMD Properties
For those who want their color changes to be permanent, you can modify CMD properties. Right-click on the CMD title bar and select Properties. You’ll find options to change the font, layout, and colors to suit your preferences.
In the Colors tab, you can choose different colors for the screen background and the text. Once done, save your changes, and CMD will remember these settings for future sessions.
Creating a Custom CMD Shortcut
To launch CMD with specific colors every time, you can create a custom shortcut. Right-click on your desktop and select New > Shortcut. Enter the following in the location field:
cmd /k color 1F
This command tells CMD to start with a blue background and white text. Name the shortcut accordingly, and every time you use it, CMD will open with your specified color scheme.
How to Change Color on Cmd for a Brighter Terminal Experience
Additional Tips for Customizing CMD Colors
Using Batch Files for Customization
One effective way to manage CMD colors is by utilizing batch files. Batch scripting allows you to automate the color-changing process each time you open CMD.
Creating a Batch Script
You can create a simple batch file. Open Notepad and enter the following lines:
@echo off
color 3E
Save it with a `.bat` extension, say `ChangeColor.bat`. When you run this batch file, it will execute the command to change the color to a specifically defined scheme (in this case, a purple background with yellow text).
Saving and Running the Batch File
When saved, double-clicking the `.bat` file will change your CMD colors instantly, allowing for an easy and quick setup.
Advanced CMD Color Customization with Registry Edits
For advanced users looking for more persistent customization, editing CMD registry entries is an option. However, proceed with caution, as improper modifications to the registry can affect system stability.
To edit colors, navigate to the registry path:
HKEY_CURRENT_USER\Software\Microsoft\Command Processor
You may adjust the `ColorTable` values according to your preferences.
Utilizing Third-Party Tools
There are also many third-party tools available that enhance CMD customization capabilities. These tools can provide additional customization options beyond CMD’s innate capabilities, allowing for more robust themes, fonts, and background images.
Troubleshooting Common Issues
Colors not Changing as Expected
If your CMD colors do not appear as set, verify that you have correct syntax. Check for possible conflicting scripts or previously set colors that might override your changes. To restore CMD to its defaults, simply type `COLOR` with no parameters, and it will revert to the original settings.
Change Timezone Cmd: A Quick How-To Guide
Conclusion
Changing color in CMD is not only about aesthetics; it’s an essential practice for improving productivity and personalizing your working environment. By following the guidelines and commands outlined here, you can easily create a command-line interface that caters to your preferences.
Create File in Cmd: A Quick Guide to Getting Started
Call to Action
Feel free to share your custom CMD setups! We encourage you to experiment with various colors and shortcuts, enhancing your command-line experience further. Don’t forget to subscribe for more valuable tips and guides on using CMD effectively!
Mastering Cmd Color Codes for Vibrant Output
Additional Resources
For further reading on CMD customization and tutorials, check out online communities dedicated to CMD enthusiasts or instructional forums that provide detailed discussions on command-line best practices.
Download Article
A step-by-step guide to changing your Cmd prompt from black & white
Download Article
Are you bored of the plain white text on black background in cmd? If yes then read on to know how to change the text colour and the background colour.
-
-
Advertisement
-
The first letter/number in the command is the colour of the background and the second is the colour of the text.
-
Use the letter/number for the color you want. e.g. Type ‘color 6’ to have yellow text, ‘color 4’ to have red text, ‘color A’ to have light green text etc. ( Ignore all quotes )
-
To change the colour of the text as well as the background, type ‘color ce’ ( without the quotes ) to have light yellow text on a light red background or any other combination.
Advertisement
-
-
-
-
-
- Play around with the combinations!
-
Advertisement
Add New Question
-
Question
Can I color certain letters or words?
Yes. Right click on the tab or image, then go to properties, then go to color and you can change the background color and the letters.
-
Question
How do I do this in a specific batch file?
Flashlight
Community Answer
Simply type the same command line code you used into the batch before echoing.
-
Question
How do I change my command prompt color to a rainbow color?
CaTsArEsOcUtE
Community Answer
I do not think there is a way to change it to rainbow color.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
List of Possible Colors
- 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
-
Be careful of the spellings of ‘color’ and do not type ‘colour’. Otherwise it will not work.
Thanks for submitting a tip for review!
Advertisement
About This Article
Thanks to all authors for creating a page that has been read 436,987 times.
Is this article up to date?
How many of you agree that in spite of all the useful features that Command Prompt possesses, it seems to be a bit boring due to the white color font with a black background?
Windows has always been colorful. Be it themes, background, or the colorful icons. Don’t you think, your colorful Windows OS should stay colorful, irrespective of the program running on it ?
So, let’s add a dab of color to Command Prompt on Windows 10, 8, and 7 and make it look vivid.
There are two different methods to change Command Prompt’s background and font color for Windows 10, 8, and 7.
1. Use Commands
Before changing the font color, you can get an overview of what can be done with the color command. Follow these steps to change the font and background color:
- Go to Start button, type ‘CMD’ in the search box to open Command Prompt.
- Command Prompt window will open, type “color/?”
- You will get the color codes.
- To get the color of the background and font changed, use the color command option along with the background color code followed by the font color code.
For Example: Let’s paint Command Prompt in white background with red font color.
- Type “Color 74”
- To change it back to default white font and black background, type “color” and boom, everything is back to basics.
- Now, you can try different combinations to make the dull command prompt window look cooler.
2. Make Changes in Properties
Don’t want to enter any commands, still, want to play with the color and customize Command Prompt. Follow these steps:
If you have Windows 10 installed, you can adjust transparency as well. Under all the different sections on Colors tab, there is an option Opacity. You can set the transparency of Command Prompt to the desired level.
Also Read: How To Remove Computer Virus Using CMD
Note: This option is only available if you have unchecked the Use legacy console setting from the Options tab.
These are the two different methods to make your Command Prompt look as colorful and vibrant as you want. Try them and let us know, which one worked for you.
Watch Video to Know More.
Overview
The COLOR
command in Windows Command Prompt (CMD) is used to set the default foreground (text) and background colors of the console window. This command can enhance readability or personalize the look of the command-line interface. It is often used in scripts to denote different process stages or alert statuses visually.
Syntax
To use the COLOR
command, the syntax is:
COLOR [attribute]
The attribute
is a two-digit hexadecimal code where the first digit represents the background color and the second digit represents the text color.
If no attribute
is provided, the command resets the color to what was set when CMD was opened.
Options/Flags
The COLOR
command supports hexadecimal characters, each representing a different color:
0
Black1
Blue2
Green3
Aqua4
Red5
Purple6
Yellow7
White8
Gray9
Light BlueA
Light GreenB
Light AquaC
Light RedD
Light PurpleE
Light YellowF
Bright White
Leading zero is necessary if the color attribute should change only one color (foreground or background).
Default:
If the COLOR
command is run without arguments, it will revert to the default colors of the CMD window.
Examples
- Set text color to Light Red with Black background
COLOR 4C
- Reset to default color settings
COLOR
- Set background to Green and text color to Light Aqua
COLOR 2B
Common Issues
- Invalid color codes: Users must ensure the syntax contains only two valid hexadecimal characters. If invalid codes are used, CMD will ignore the command.
- Visibility issues: Some color combinations (e.g., blue text on a blue background) can lead to unreadable text. Always choose contrasting colors.
Integration
Script Usage
In batch files, COLOR
can be used to signal different sections of the script or signify success/warning/error states:
@echo off
COLOR 2E
echo Starting processing...
REM Processing steps here
COLOR 4E
echo WARNING: Low memory detected.
REM More processing steps here
COLOR A2
echo Process completed successfully.
Combined with ECHO
Used with ECHO
, COLOR
can highlight specific messages:
COLOR C
echo IMPORTANT: System will restart in 5 minutes!
MODE
: Adjusts properties of the console, including display settings.TITLE
: Sets the Command Prompt window title which can be visually informative along with color coding.
For more commands related to CMD customization, see Microsoft’s official CMD documentation.
This guide covers how to use the COLOR
command to customize the appearance of your CMD session dynamically and visually communicates the condition or status within scripts or during routine CMD interactions.