Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Few years ago, I changed color scheme of command prompt. Now, I have forgotten how exactly I did this.

  1. It's permanent. So, COLOR command is out of question.
  2. It's intact no matter from where I launch cmd. So, changing color from shortcut properties is out of question because I get the color scheme even when I launch cmd from Run or from original location.
  3. It doesn't let me override it by shortcut properties. And, this is the problem. I create a cmd shortcut and change its color scheme from properties. But, this isn't reflected even after reboot.

So, the only option I have left: Use the same method I used few years ago. How did I change cmd color?

share|improve this question
up vote 5 down vote accepted

The cmd colours can be changed in the registry.

Navigate to HKEY_CURRENT_USER\Software\Microsoft\Command Processor and check the DefaultColor entry. Default value is 0 (zero). To change the colours, enter a value of two hexadecimal digits, the first one specifying the background colour, and the second one the text colour. Possible values are as follows:

0 - black
1 - blue
2 - green
3 - aqua
4 - red
5 - purple
6 - yellow
7 - white
8 - grey
9 - light blue
A - light green
B - light aqua
C - light red
D - light purple
E - light yellow
F - bright white

So for instance, a value of 4A will give you light green text on a red background.
Note that values where the two digits are the same are invalid, so you can't have the same colour for the text and the background.

If the above doesn't work, check the same entry under HKEY_LOCAL_MACHINE, you may have changed it there.

share|improve this answer
Of course, you’ll have to restart the console after making the change for it to take effect. – Synetech Jun 28 '12 at 5:14

The correct way to permanently set the colors (and other parameters) of a console/command-prompt is to:

  1. Open a command-prompt
  2. Right-click the titlebar or press Alt+Space
  3. Select Defaults from the context-menu
  4. Set the properties you would like (colors on the Colors tab)
  5. Click OK

The method that Tapped-Out gave works because Windows 7 happens to have a bug where the Properties option modifies the default values instead of just for the current console, and it could be fixed at any time.

The method that Indrek gave works as well, but using the provided interface is easier (and safer) than manually editing the registry, especially when setting the colors since you don’t have to mess around with hexadecimal values. Also, you don’t have to worry about setting permissions with the interface.

Finally, a word of warning. Each console type gets its own set of parameters, as does each shortcut to a console. In other words, if you create a shortcut to a console, changing the parameters will modify the shortcut and apply only to the console opened by the shortcut, not via other shortcuts or means. Also, if you run a console application and modify the parameters, they will be applied only to that console application and not to other consoles such as the command-prompt.

To clarify, what happens is that all consoles (command-prompts and console apps) use the default settings (stored in HKCU\Console) until they are specifically changed, at which point they will make a copy of those settings and use those from then on. For example, if you open, it will initially use the settings in HKCU\Console, but if you make changes to it, a copy will be made to HKCU\Console\, and changes to the defaults will no longer be reflected because settings specific to exist (and override the defaults). This is similar to how user settings override system settings (e.g. HKCU overrides HKLM defaults).

share|improve this answer
I don't get your last paragraph. I use command-line vim to edit text files. When I change color scheme from cmd shortcut properties, same scheme is applied to vim file editing console. How? – Evil Angel May 27 '12 at 0:21
All consoles use the defaults, but if you then set the paramters for a specific console app, it will make a copy specifically for that app and those will be used from then on. When you change the normal command-prompt settings, VIM is using those, but if you then make a change to VIM itself, it will use those and stop using the default one. I’ll edit the answer to expand on this. – Synetech May 27 '12 at 0:33
But, cmd shortcut properties aren't global defaults. How does VIM get that? – Evil Angel May 27 '12 at 0:48
Like I said, all consoles that don’t have their own specific properties use the defaults in HKCU\Console. Command-line VIM is a console app and so uses the console subsystem, so when it runs CSRSS gives it the default settings from there just like any other console app. If you change the settings for VIM, it will use those instead. If you make a shortcut to VIM, you can change the settings for just that shortcut and have VIM use the defaults when launched in other ways. You can even make several shortcuts, each with their own settings. – Synetech May 27 '12 at 12:49
No.. No... I am not talking about VIM shortcut. I am talking about cmd shortcut. VIM console takes color scheme of cmd console from which you have initiated it. You can test it. – Evil Angel May 27 '12 at 15:36

In cmd, right-click on the title bar and select properties:

title bar context menu

Click on the Colors tab:

properties - colors tab

You can change the command prompt's color settings here. From my testing, it globally alters the color scheme.

share|improve this answer
This is directly attached with shortcut properties. When session isn't launched from shortcut, its temporary... – Evil Angel May 26 '12 at 23:38
Well, you can also left click on cmd icon (on title bar) to get to there. – Evil Angel May 26 '12 at 23:39
I set custom colors this way and then ran it from the Run dialog (Win+R). The custom colors were retained across sessions. How is this temporary? – nc4pk May 28 '12 at 1:37
It's a known bug:… – Evil Angel May 28 '12 at 5:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .