Skip to content

Instantly share code, notes, and snippets.

@P4
Last active April 13, 2024 05:23
Show Gist options
  • Save P4/4245793 to your computer and use it in GitHub Desktop.
Save P4/4245793 to your computer and use it in GitHub Desktop.
Color schemes for Windows Command Prompt
Windows Registry Editor Version 5.00
; Default color scheme
; for Windows command prompt.
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:00000000
"ColorTable08"=dword:00808080
; BLUE LBLUE
"ColorTable01"=dword:00800000
"ColorTable09"=dword:00ff0000
; GREEN LGREEN
"ColorTable02"=dword:00008000
"ColorTable10"=dword:0000ff00
; CYAN LCYAN
"ColorTable03"=dword:00808000
"ColorTable11"=dword:00ffff00
; RED LRED
"ColorTable04"=dword:00000080
"ColorTable12"=dword:000000ff
; MAGENTA LMAGENTA
"ColorTable05"=dword:00800080
"ColorTable13"=dword:00ff00ff
; YELLOW LYELLOW
"ColorTable06"=dword:00008080
"ColorTable14"=dword:0000ffff
; LGRAY WHITE
"ColorTable07"=dword:00c0c0c0
"ColorTable15"=dword:00ffffff
Windows Registry Editor Version 5.00
; Monokai color theme. Based on Sublime Text 2
; for Windows command prompt.
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:00222827
"ColorTable08"=dword:00414746
; BLUE LBLUE
"ColorTable01"=dword:00a64c1d
"ColorTable09"=dword:00ef9566
; GREEN LGREEN
"ColorTable02"=dword:0000995d
"ColorTable10"=dword:002ee2a6
; CYAN LCYAN
"ColorTable03"=dword:00746a31
"ColorTable11"=dword:00efd966
; RED LRED
"ColorTable04"=dword:002900b0
"ColorTable12"=dword:007226f9
; MAGENTA LMAGENTA
"ColorTable05"=dword:00b63865
"ColorTable13"=dword:00ff81ae
; YELLOW LYELLOW
"ColorTable06"=dword:001f97fd
"ColorTable14"=dword:0074dbe6
; LGRAY WHITE
"ColorTable07"=dword:008a908f
"ColorTable15"=dword:00f2f8f8
Windows Registry Editor Version 5.00
; Low-contrast, pastel color scheme
; for Windows command prompt.
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:00222222
"ColorTable08"=dword:00454545
; BLUE LBLUE
"ColorTable01"=dword:00a69a7c
"ColorTable09"=dword:00bfad8f
; GREEN LGREEN
"ColorTable02"=dword:00557e6c
"ColorTable10"=dword:007db37d
; CYAN LCYAN
"ColorTable03"=dword:00a18e4c
"ColorTable11"=dword:00d0c16b
; RED LRED
"ColorTable04"=dword:0041569e
"ColorTable12"=dword:006d89cc
; MAGENTA LMAGENTA
"ColorTable05"=dword:009d6d95
"ColorTable13"=dword:00cb8fc1
; YELLOW LYELLOW
"ColorTable06"=dword:002bafca
"ColorTable14"=dword:0056b5bf
; LGRAY WHITE
"ColorTable07"=dword:00808080
"ColorTable15"=dword:00cdcdcd
Windows Registry Editor Version 5.00
; Zenburn is a low-contrast color scheme
; for Windows command prompt.
; See : http://slinky.imukuppi.org/zenburnpage/
; Values stored as 00-BB-GG-RR
[HKEY_CURRENT_USER\Console]
; BLACK DGRAY
"ColorTable00"=dword:003f3f3f
"ColorTable08"=dword:008080c0
; BLUE LBLUE
"ColorTable01"=dword:00af6464
"ColorTable09"=dword:00ffafaf
; GREEN LGREEN
"ColorTable02"=dword:00008000
"ColorTable10"=dword:007f9f7f
; CYAN LCYAN
"ColorTable03"=dword:00808000
"ColorTable11"=dword:00d3d08c
; RED LRED
"ColorTable04"=dword:00232333
"ColorTable12"=dword:007071e3
; MAGENTA LMAGENTA
"ColorTable05"=dword:00aa50aa
"ColorTable13"=dword:00c880c8
; YELLOW LYELLOW
"ColorTable06"=dword:0000dcdc
"ColorTable14"=dword:00afdff0
; LGRAY WHITE
"ColorTable07"=dword:00ccdcdc
"ColorTable15"=dword:00ffffff
@karthikraman
Copy link

Outstanding! Thanks so much. Great to run Bash on Windows 10 with the sublime monokai colour scheme :)

@austinjdean
Copy link

austinjdean commented Aug 4, 2016

@karthikraman, I'm attempting to get these colors to appear in Bash on Windows 10, but despite running the registry files provided here, the color schemes are ignored by Bash. They work in good ol' cmd, but no luck so far for seeing them in Bash. How'd you do it? (The following picture was taken after I ran monokai.reg, and rebooted.)
capture

@constantinevitt
Copy link

constantinevitt commented Aug 5, 2016

^ Change the key from [HKEY_CURRENT_USER\Console] to [HKEY_CURRENT_USER\Console\Command Prompt] or directly to [HKEY_CURRENT_USER\Console%SystemRoot%_system32_bash.exe]

@purag
Copy link

purag commented Sep 11, 2016

I have had trouble getting the colors to stick in Bash. It doesn't seem to work with either of the three keys suggested here. Any other tips?

@IGTHORN
Copy link

IGTHORN commented Sep 20, 2016

purag, I couldn't find the registry location for these settings, but if you launch bash from the start menu and then change the colours, the next time you launch from the start menu it will have the correct colours. Delete all your other shortcuts (and pinned taskbar shortcuts) and recreate them, they should then inherit the colours.

@roelandmoors
Copy link

It seems the properties are stored in the shortcut.
Here is the bash/ubuntu shortcut: C:\Users\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Bash on Ubuntu on Windows.lnk
These settings override the default settings from HKEY_CURRENT_USER\Console.
If you create a new shortcut you should have the default settings again.
This is the command: C:\Windows\System32\bash.exe ~
The icon is here: %USERPROFILE%\AppData\Local\lxss\bash.ico

@Elanmarkowitz
Copy link

You can also switch to bash from command prompt by using the command bash (same window)

@greenJIS
Copy link

what is the meaning of colorTables in the program? can u please explain.

@rbeesley
Copy link

@r03 had the right solution. Once you have things working in a Command Prompt by importing HKCU\Console, unpinning the BASH shortcut from my taskbar and then repining it solved my "colors aren't changing" problem.

@TheRealJimShady
Copy link

I've downloaded the files and tried the monokai one and it works in git bash but not the command prompt... I have my own custom colours which I've been using, could these be overriding those in the registry?

@TheRealJimShady
Copy link

...in answer to my own question, for some reason by accessing the prompt via Win + 'cmd' + Enter, it kept my colours, but by doing Win+R 'cmd' + Enter, it used the colours from the registry. wierd.

@GueGuerreiro
Copy link

@JSmith2412 Open the "Win+ 'cmd'" Shortcut location, open the location of that shortcut ( the real, one and only, cmd.exe ), and make a shortcut of that original cmd and replace it with the one you found previously. Now the themes should match, however way you open it :)

The "Win + 'cmd'" shortcut is using the properties of the cmd.exe before it's colors were changed, so you gonna replace it with the update version.

@tianrluo
Copy link

tianrluo commented May 25, 2017

@r03

It seems the properties are stored in the shortcut.

You saved me,
I was trying to reset my configs and deleting entries from regeditor helped on nothing, until I deleted my shortcuts

Thanks a lot

@ChatzisE
Copy link

ChatzisE commented Jun 8, 2017

amazing work ! thank you so much , perfect you make my day!

@stkb
Copy link

stkb commented Jul 21, 2017

Thanks a lot for these. For reference, here is a great blog post on how Windows Console Host settings work in general: https://blogs.msdn.microsoft.com/commandline/2017/06/20/understanding-windows-console-host-settings/

@hodispk
Copy link

hodispk commented Jan 15, 2018

Thank you!

@qodunpob
Copy link

Thanks to this, I was able to customize cmd at will https://gist.github.com/bashkos/4a2e16aa259f16353c040896b42242f5

@stkb 👍

@travisterrell
Copy link

There is now a Microsoft tool that makes this WAY easier.
https://github.com/microsoft/terminal/tree/master/src/tools/ColorTool

It comes with a 8 themes, or you can get a couple hundred more here:
https://github.com/mbadolato/iTerm2-Color-Schemes/tree/master/schemes

(Just an FYI for those who read the comments before trying this.)

@lakshits11
Copy link

How to reset all these color changes..?? Please help me

@travisterrell
Copy link

@lakshits11 The first one listed (default.reg) should reset the colors to default. (If not, you need to provide a bit of an explanation of what you've done.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment