How did I change color scheme of command prompt?
The correct way to permanently set the colors (and other parameters) of a console/command-prompt is to:
- Open a command-prompt
- Right-click the titlebar or press Alt+Space
- Select Defaults from the context-menu
- Set the properties you would like (colors on the Colors tab)
- 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 edit.com
, it will initially use the settings in HKCU\Console
, but if you make changes to it, a copy will be made to HKCU\Console\c:windows_system32_edit.com
, and changes to the defaults will no longer be reflected because settings specific to command.com
exist (and override the defaults). This is similar to how user settings override system settings (e.g. HKCU overrides HKLM defaults).
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.
Actually change the windows console colors (change what 'blue' is)
To actually change the colors (theme) of the consoel (Powershell, cmd, bash, etc) for Windows 10, use Color Tool, which is procuced by Microsoft's console team.
colortool -b solarized_dark
Read more about colortool.
To change which color is used (pick a different color for blue from a limited set of colors)
Of course, you can try it with Command prompt itself, but you can only change the text color:
- click on the Command Prompt icon in the top left corner of the window and select Properties.
- Select the Colors tab, and then
- choose the color you want for the screen text and background. You can also enter your own RGB color combination if you want.