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.

Enjoy!

The Windows Console Team.

 

Comments (66)

  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.

  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.

  4. d says:

    how do we get it?

    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.

  5. David Poirier says:

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

  6. rahul says:

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

  7. 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!!!

  8. Robert says:

    This is wonderful! Keep up the good work!

  9. BrianWatts says:

    What is the actual script to produce this output?

  10. 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.

  11. 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.

  12. 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.

  13. Jerome says:

    OMG! Stop the presses! Alert the Queen!

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

  14. 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” 🙂

  15. 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.

  16. Nicolás Parada says:

    Best new ever :’D

  17. Nicolás Parada says:

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

    1. Kabeer Vohra says:

      Use tmux for tabs, it will change your life 🙂

  18. 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.

  19. 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…

  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:

    http://i.imgur.com/Xxr41Cb.png

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

  21. 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:

    http://i.imgur.com/Xxr41Cb.png

    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.

  22. 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.

  23. 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.

  24. 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

  25. 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.

  26. 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.

  27. 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?
    Thanks!

    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.

  28. 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.

  29. 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.

  30. 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.

  31. 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

Skip to main content