24-bit Color in the Windows Console!

One of the most frequent requests we receive is to increase the number of colors that the Windows Console can support. We love nothing more than to deliver features you ask for!

But rather than just add a few more colors, or limit our console to a mere 256 colors, in Windows 10 Insiders Build #14931, we've updated the Windows Console to support full, glorious 24-bit RGB true color!

This is actually a little tricky to demo since most Windows apps only support 16 colors at most whereas the Linux world has broadly supported 256 color terminals for a while now, and 24-bit color is becoming more established.

Thanks to our ability to run Linux apps and scripts using our new Bash on Ubuntu on Windows environment atop the Windows Subsystem for Linux (WSL), we can use some Linux scripts and tools to demonstrate the Console's new 24-bit color support:

24-bit Color Bars

24-bit Color Bars

24-bit Color Grids

24-bit Color Grids

We've not yet started work on improving the console properties page to support the Console's new color rendering capabilities, and we've not modified the default Windows color mappings; we'll be making improvements here, and on the many, MANY other features queued-up in our backlog in future builds.


The Windows Console Team.


Comments (89)

Cancel reply

  1. Lachlan Picking says:

    Over the years I’ve had countless conversations with people about the command line experience in Windows; mostly trying to sell them on the idea of PowerShell (because it’s awesome). I would often hear them say they can’t stand PowerShell/cmd, and then proceed to list a bunch of reasons like not being able to resize the window sensibly, etc.

    “No, no, no! That’s the *console* you’re complaining about!”, I would reply. “And yeah, Microsoft basically haven’t touched it in 20+ years for whatever reason.”

    I don’t know what that reason was, but I always just assumed maybe the console had a really intimidating codebase that would explode if you so much as sneezed at it. Or maybe it was just a business case thing? Whatever the reason, I am so happy and impressed with the work you guys have done on the console in Windows 10 and the UserVoice page is full of really exciting stuff. You guys are awesome and I can’t wait to see what comes next.

    1. ExE Boss says:

      > I always just assumed maybe the console had a really intimidating codebase that would explode if you so much as sneezed at it.

      As this post¹ suggests, that is exactly the case.

      ¹ https://blogs.msdn.microsoft.com/commandline/2018/06/27/windows-command-line-the-evolution-of-the-windows-command-line/#the-windows-console-reboot-and-overhaul

  2. Will there be a win32 API to access the new range of colors?

    1. We’ll be publishing general guidance v. soon.

  3. Eric Pellegrini says:

    This is awesome. Thanks! Any word on getting VS Code to work in the WSL?

    1. Petr Houška says:

      Wsl works with code quite well 🙂

    2. KenC says:

      I started working on code a VS Code port equals Electron port equals Chrome port here https://goo.gl/ONCwUN (note the version number) but got bogged down in missing futex surface. It should be possible to do with what’s available in WSL now, I just haven’t gotten back to it.

      Very cool on the the true color support. But it would be even cooler with Sixel. 🙂

      1. If you’re interested in sixels, please upvote this UserVoice issue and share your scenario: https://msdn.microsoft.com/en-us/PowerShell/dsc/overview. Thanks.

        1. mobluse says:

          I would like to upvote Sixel support, but I can’t find where on that site. Sixel works now in Bash on Ubuntu on Windows but requires Xming and MLTerm or XTerm. I’ve recompiled GNUPlot from the Ubuntu 16.04 distribution with support for Sixel graphics (set term sixel). GNUPlot is in turn used by Octave and other big data programs. It’s very useful to have the diagrams in the terminal and not in some popup window, because one can e.g. scroll back, know where to look, and can avoid the mouse. It would also be easier to install these big data programs if one doesn’t need Xming.

    3. WSL is only focusing on running command-line tools right now. That said, rather than run VSCode “in” WSL, we’re working to improve interop between Bash and Windows which should make things a lot easier.

    1. It’s available in yesterday’s Insiders build #14931.

      1. Matthew Hiebert says:

        I have that build, how do I enable it or configure the console to reflect at least the 256 color sequences?

        1. You don’t have to do anything; the console now supports 8, 16, 256 and 16M colors.

  4. David Poirier says:

    Really nice. Time to write that BBS-style console dashboard I’ve had up my sleeve for a while…

  5. rahul says:

    Wow .. nice .. Keep the updates to console coming to make it as the no.1 console across other platforms

  6. Mark Jx says:

    Any chance you guys could post the two scripts you used to generate these graphics? Or some pointers on how to do that ourselves? I’d love to show this off to some people at work! THANKS!!!

  7. Robert says:

    This is wonderful! Keep up the good work!

  8. BrianWatts says:

    What is the actual script to produce this output?

  9. s k says:

    Nice, good job! Now we only need a few more usability enhancements to the Console then this is going to be actually nice to work with (infinite scrollback being the most important one I think).

    1. Be careful what you wish for – infinite anything can result in sluggishness, full hard-drives, crashing apps, and the end of civilization as we know it 😉

      Seriously though – we’ve got A LOT of improvements (including this one) queued up – lots more to come yet.

  10. astr0wiz says:

    I am impressed! It’s a weird step sorta backwards from the Windows GUI, yet forward from plain-Jane monochrome. I can’t wait to see what I can do in that mode, being an old-timer and used to terminfo-style graphics.

  11. belleve says:

    How to use them in Win32 API?
    I mean, using a new API or use escape sequences?

    1. Our advice is to use VT sequences for access to the new, advanced features of the console.

  12. Jerome says:

    OMG! Stop the presses! Alert the Queen!

    1. I did alert Her Majesty and she replied with “One is most definitely amused”!

  13. CerebralMischief says:

    Sweet! I’m really loving the new Console and supporting 24-bit colors is a fantastic addition! I look forward to seeing what more you have in store for us with this feature… I’m super stoked about Microsoft embracing and support Linux instead of considering it a “cancer” 🙂

  14. Eric Rasmussen says:

    This is great! Do you have any plans to bring ANSI colors support back into the Command Prompt in Windows 10? It was there and worked great in the November 2015 version of Windows 10 but then was removed and no longer works in the Anniversary Update. It was nice while it lasted, but it would be great if you could bring it back with this change as well!

    1. Color support has not been removed – in fact, in build 14931, we extended color support to full 24-bit color.

  15. Nicolás Parada says:

    Best new ever :’D

  16. Nicolás Parada says:

    Now we need utf-8, emojis and better font rendering. And tabs, of course.

    1. Kabeer Vohra says:

      Use tmux for tabs, it will change your life 🙂

  17. Jon E. Gross says:

    Any chance of getting non-latin character support in the console?

    1. We are working on it. Any particular languages you’re particularly interested in?

      1. barbodgif says:

        Unicode would be good. (Arabic, Farsi, Hebrew,..)

        1. We’re working on improving our UTF-8 support as I speak, and will be looking at providing better font-fallback support in the future.

  18. Kenya-West says:

    Hope there will be programs that translate picture from running game to console with 120 fps! Just for lulz!

    1. Not entirely sure you’d want to play a 120fps game rendered in ASCII art 😉

      1. AJ ONeal says:

        Ah… but you’re not entirely sure that we won’t. I definitely would. In fact, don’t be surprised if I don’t try to write one myself with the node.js tty module some day…

  19. AJ ONeal says:

    I already had Bash on Ubuntu on Linux installed (and I quit using it and went back to my Mac because the colors were so bad I couldn’t read the screen) and so now I’m eager to try this out, but after getting the update (my desktop shows 14931 in the right hand corner) and rebooting I still see this when I ssh into a box that has vim set up with the solarized theme:


    What do I need to do to enable the new color mode?

  20. AJ ONeal says:

    I already had Bash on Ubuntu on Linux installed (and I quit using it and went back to my Mac because the colors were so bad I couldn’t read the screen) and so now I’m eager to try this out, but after getting the update (my desktop shows 14931 in the right hand corner) and rebooting I still see this when I ssh into a box that has vim set up with the solarized theme:


    So what do I need to do to enable the new color mode?

    1. Where did you get the solarized vim color theme? I’d like to repro. Could I ask that you file an issue on GitHub though – easier to track over there: https://aka.ms/winbashgithub. Thanks.

      1. Kabeer Vohra says:

        I have the same issue, I have created a issue on github here: https://github.com/Microsoft/BashOnWindows/issues/1706

        Could you please take a look? Thanks

        1. Take a look at the GH bug: Have created an internal bug to triage & track.

          Thanks for raising.

  21. barbodgif says:

    In 1511 we had access to colorized output (programs could print colored output) but now after Anniversary Update, they have been impeded to do so, (however, txt/bat files containing ESC sequences still work). Is there any reason that you have removed this feature from 1607 just to add a somewhat broader implementation in the Insider Build? Is there any workaround till the update goes public?

    1. We’ve not removed any color support from the console. In fact, in Win10 build #14931, we extended the console to support 24-bit true-color.

  22. Stéphane BARIZIEN says:

    Will we get access to more colors also outside of WSL, say in the PowerShell console host, in the PowerShell ISE (and why not in CMD even though I try to avoid this by all means, except maybe to write double-clickable launchers for .ps1 scripts 😉 )?

    If yes, how? (I’m thinking of being able to specify a 24-bit color value in, say, $host.UI.RawUI.BackgroundColor or as the -ForegroundColor argument to Write-Host, etc.)

    And when? 😉

    1. When those tools start emitting the necessary VT sequences to render > 16 colors. We don’t currently plan on updating the console API’s to support the many new features we have added, and continue to add, to support VT.

      1. melak47 says:

        “We don’t currently plan on updating the console API’s to support the many new features we have added, and continue to add, to support VT.”

        Does that mean there won’t be a way to retrieve the console buffer contents with true color attributes (analogous to ReadConsoleOutput), or the plain text with escape sequences?

        1. Not at this time. This model breaks down quickly, esp. when communicating between a Console and a remote command-line application.

          In the VT world, one should aim to maintain a local “mental model” of what you expect the screen to look like, and generate the VT sequences to render that UI.

      2. adamy says:

        The following extended API’s would be appreciated, which utilise RGB values plus underline/bold etc in the high order bits.
        SetConsoleTextAttributeEx, GetConsoleTextAttributeEx
        WriteConsoleOutputAttributeEx, ReadConsoleOutputAttributeEx

        1. We have no current plans to retrofit the additional VT capabilities into the Windows API. While this may appear odd at first, understand that there are some breaking scenarios, esp. when talking between a local Console and a remoted command-line app (even if it’s running on the same machine).

          The model of embedding VT sequences into your output text is a far more resilient, consistent, and future-proofed way of rendering formatted/structured text.

  23. Kuri Savion says:

    OMG! I just accidentally ran 24 color shell script and saw true color support. It is early to state that thee God does exist, before property page is done, but I start getting hard suspicious that it is true:D

    1. We don’t need gods – just smart engineers 😉 😀

  24. Erik says:

    I have no /dev/colors/-folder. Running 14942. How do I use these colours? With ansi escape codes, only the ones from ANSI standard works.

  25. Evaldas says:

    Hi, where I can set colors in regedit for bash.exe? I did this successfully for cmd.exe.

    1. You don’t: You configure your bash colors in your .bashrc.

  26. Niels says:

    This is awesome! Is it possible to update WSL separately of Windows builds? I’d prefer not to run the insider builds but instead run the stable, which at this point in time is 1607 (the anniversary update) which has WSL but not the 24-bit color support. Is there a way for me to update just WSL or do I really need to run insider builds?

    I assume it’ll be at least a few months before it comes to stable?

    1. No – although we’d love to if we could! 🙂 WSL itself is kernel infrastructure which takes advantage of, and is coupled to, several other pieces of kernel infrastructure which currently have to evolve in lock-step. Not saying we can’t do this at some point in the future, but it’s not on the cards anytime soon.

  27. Steve Ford says:

    This is wonderful. My favourite Monokai theme in Emacs, and my custom colour configuration in Mutt look just the way I like them. I’ve been using OpenBSD 6 in VirtualBox to do my daily work, but now I think I should try switching to WSL full-time. Thank-you Rich and everyone else at Microsoft. My favourite Linux Desktop is Windows 10.

  28. Bear Varine says:

    Any idea when this feature will be pushed out as part on an official update to Windows 10?

    1. Windows Insider builds are previews of what’s (likely to) ship in the next OS release – in this case, Windows 10 Creator’s Udpate due spring 2017.

  29. The CLI Guy says:

    “…we can use some Linux scripts and tools to demonstrate the Console’s new 24-bit color support”.

    Rich – Please can you publish the scripts? I’d really like to have a play with this.

  30. Adam Young says:

    Very interested in 256+ console color support. Previously this functionality could be implemented by hijacking the DC and directly drawing into the console, whilst updating the native console with redraw disabled. I am keen to build a library which supports 256+ on both 10 and legacy Windows versions/consoles, Please publish the underlying ESC controls.

    1. Just enable VT support and emit 24-bit color VT sequences.

      1. Adam Young says:

        Can you publish the prescribed method(s) by which detection of the new console features should be performed?
        Running under Console2 and available color depth. thx

  31. tromatise says:

    That’s good but I have a problem since this update. Unfortunately I can’t use the new ESC sequences in my Java program. Previous year when I wrote ” System.out.print(“\u001b[31mText”); ” my text was in Red color and now my text appear with a non-recognized character before (like a square with an interrogation point in). So, what it’s the new escape sequence please ??
    Pardon my english.

    1. make sure you’re not running your Console in legacy mode

      1. tromatise says:

        ok thx

  32. Pedro says:

    Is this an increase in the number of colors the “Windows Console” supports or a whole new shell program? Because it seems to me this is not cmd.exe but bash.exe, and we’ve had decent color support from external shell emulators from a long time ago. I reckon transparency was a very nice addition to Windows Console (cmd.exe), I’m glad, but I really still wait for the color upgrade, please take a look at that!!

    1. Windows Console is the terminal app built into Windows. Until we overhauled its color support, it was only able to display up to 16 colors. This improvements now allows the console to render in full 16M 24-bit color. To use these new colors, apps will need to enable VT support (already enabled when using Bash & PowerShell), and will need to emit VT sequences requesting 24-bit colors.

      This doesn’t magically make things display rich colors if they’ve not been built to ask for rich colors.

  33. I just installed bash, but true color does not work, it is only 16 colors. What can I do?

    1. Try installing lolcat (sudo apt install lolcat) and then piping text through lolcat (e.g. ll | lolcat) – you should see the text colored through a color gradient.

      Note: The Console color settings tab has not yet been updated to display a 24-bit color palette.

  34. Daniel says:

    Is there a Win32 API available for this yet? The ANSI codes work great, but it seems like ESC[3J doesn’t work at all and ESC[2J clears the screen with the default background color (as defined by the “color” console command, which is just a wrapper around SetConsoleTextAttribute()) instead of the color that was set via something like ESC[48;2;;m.

    1. We’re encouraging users to write apps that emit VT sequences to handle command-line screen output/formatting. To do so, enable VT support and talk VT: https://msdn.microsoft.com/en-us/library/windows/desktop/mt638032(v=vs.85).aspx

  35. Brian Lichner says:

    Awesome. Now I just need a 24 bit color QBasic.

  36. Is any work being done to publish a Command reference for the latest version of the console commands? There have been several significant improvements to them in Windows 10 but there is no supporting documentation.

    Purely by way of example, the netsh command has been made much more powerful but the only method for studying it is to plod through each set of sub-commands using netsh mbn connect /? & so on.


    1. Thanks for your question: All of our online documentation is currently undergoing a major overhaul, and we’ll soon be starting on some pretty major updates to the Windows Console docs.

      While we don’t own docs for netsh, I’ll forward your comment to the owning team and will work with them to get things updated.

      Thanks for your feedback.

      1. Great. I’ll keep an eye out for the updates. Denis

  37. hmmm. Your post is from 19 months ago (1.5 years)

    Other than internal windows builds (and possibly under the nix-subsystem), does any color set beyond outputting using a 16-color palette work in any release. e.g., using indexed or rgb color ansi-tty sequences result in mapping colors down to a 16-color palette. No true color us output?

    I’m using Windows: 16299.rs3_release.170928-1534

    Am I just being dumb, lol. I have not every had a problem getting console color output on Windows 10. But getting full range of indexed and 24-bit color palette has never worked for me using:

    1. If you want to display 24-bit RGB colors, you’ll need to enable VT support via `SetConsoleMode()` and emit RGB color sequences.

      Please review these docs for details: https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences.

  38. Stolk says:

    I wrote an image viewer for the console.

Skip to main content