Skip to content

Color rendering issues #76

Closed
Closed

Description

@tycho

Most colors don't render properly. Below examples use this script.

MinTTY (Cygwin):
colortest on MinTTY

Bash on Windows:
colortest on Bash

Activity

  1. zadjii-msft commented on Apr 8, 2016

    @zadjii-msft
    Member

    Right now conhost's color support is limited to the default 16 ASCII colors, but 256 color support is most definitely high on the backlog of things we'd like to support in the near future!

  2. jbaribeault commented on Apr 8, 2016

    @jbaribeault

    Great to hear!

  3. kilobyte commented on Apr 11, 2016

    @kilobyte

    256 color support is an addition that is in no way required.

    This said, because of a misdesign they do need to be explicitly recognized in order to be ignored, otherwise the result is interpreted as random unrelated codes (example: printf 'foo\e[38;5;1mbar\e[0m\n'). Here's how to detect them: https://github.com/torvalds/linux/commit/3415097ff0529eac264b8ccfa06572871e45c090 (my comment that 24-bit is "extremely rare" is no longer true: https://gist.github.com/XVilka/8346728).

    Adding actual support for 256/24-bit color to conhost would require significant API changes -- Windows Console is internally married to the 16 color scheme. Just like Linux console (VT not some X terminal) -- the most you can do is to try match nearest color. I did happen to implement that: torvalds/linux@cec5b2a

    Microsoft guys: I hereby relicense these two commits, please feel free to use/adapt them.

  4. bitcrazed commented on Apr 28, 2016

    @bitcrazed
    Contributor

    Fixed internally. Bubbling up through the build system.

  5. retep998 commented on May 11, 2016

    @retep998

    Rich Turner (@bitcrazed) Will there also be an equivalent Windows API method to take advantage of the enhanced color support?

  6. zadjii-msft commented on May 11, 2016

    @zadjii-msft
    Member

    Peter Atashian (@retep998) At this time, the API surface isn't changing at all. We're not yet supporting full 256 color or 24 bit RGB yet - we're merely finding the nearest color from the 16-color table and using that to render the color for applications using those sequences. Unfortunately, supporting true 256 color requires a lot more work than was possible to get done for this update.

  7. fredrikaverpil commented on May 17, 2016

    @fredrikaverpil

    Fixed internally. Bubbling up through the build system.

    Just curious... when is this supposed to bubble out to insider previews?

  8. zerocool4u2 commented on May 27, 2016

    @zerocool4u2

    sin titulo

    14352

  9. dreyks commented on Jun 9, 2016

    @dreyks

    Alexis Ramis (@zerocool4u2) how did you get those fancy powerline symbols working? Did you install additional fonts?

  10. zerocool4u2 commented on Jun 10, 2016

    @zerocool4u2

    Roman Usherenko (@dreyks) yup i don't remember witch one was that, but there are some repos with patched fonts, https://github.com/gabrielelana/awesome-terminal-fonts https://github.com/ryanoasis/nerd-fonts/ are a couple of them, i'm actually currently working on courier prime code, that was my favorite and i'm trying to get a propper patch on it(most of them are patched with scrips and there aren't the best with most the scenarios, speceally with windows monospaced definition, if that makes sence), let me know if you want it, regards
    boceto

  11. musm commented on Jun 11, 2016

    @musm

    256 color support would be magical

  12. JoBrad commented on Jun 20, 2016

    @JoBrad

    Full color support would be amazing to have!

  13. 3 remaining items

  14. benhillis commented on Jul 15, 2016

    @benhillis
    Member

    image

  15. cscorley commented on Sep 7, 2016

    @cscorley

    I do not think this should be considered as "fixed" yet. Happy to have color mappings, but they're still mapping to incorrect colors. This is a workaround at best.

  16. kilobyte commented on Sep 8, 2016

    @kilobyte

    Christopher Corley (@cscorley): I'm afraid such a full fix would require so much work that WONTFIXing it for the time being is reasonable. The problem is, the CHAR_INFO structure has no room for expansion and gets passed to and from user programs a lot. Thus, a load of functions and structures would need to receive new versions and a translation layer between such a new internal format and the old API. Doesn't sound enticing to me to do that just to have more colors on the console.

    Other SGR codes such as strikethrough, italic or blink have spotty support and about no use among Unix terminals, so 256/24-bit color would be the sole real gain.

  17. zadjii-msft commented on Sep 8, 2016

    @zadjii-msft
    Member

    This was closed as adding support for processing 256-color sequences, #345 is the current active issue for adding the actual full RGB color support

  18. cscorley commented on Sep 8, 2016

    @cscorley

    All is very understandable w.r.t work needed for full color support. I was disappointed to find this marked fixed; thought that something was wrong with my environment for a long time. Missed the link to the new issue. Thanks, all!

  19. cscorley commented on Sep 8, 2016

    @cscorley

    S (@SRGOM) I've tried both ConEmu and ConsoleZ as of this week. They both do not add full 256 color support; both seem to display the same color mappings as above. Thanks for the suggestion, though.

  20. musm commented on Sep 8, 2016

    @musm

    +1 to conemu, however it's kind of bloated and snapping doesn't work properly to due win32api bug apparently and does not have proper xterm compatible 256 colors using bash.

    The solution I found for 256 colors is to use mintty! Install msys2 http://msys2.github.io/ and use that. It works for cmd and for bash you have 256 colors! They also have some awesome features planned like font fallbacks (which will be godsend for math programming in Julia due to all the unicode symbols Julia takes advantage of). In addition, it only works for powershell -version 2 there's a bug with the readline in powershell 3 in windows 10 that gives it problems when trying to run through mintty.

    I'm still trying to figure out how to optimally configure mintty (key mappings are annoying)

    image

  21. musm commented on Sep 8, 2016

    @musm

    More pics:
    image

  22. onomatopellan commented on Sep 9, 2016

    @onomatopellan

    I agree so far the best way of using WSL with 256 colors is mintty, but better through this great package https://github.com/goreliu/wsl-terminal/releases

  23. musm commented on Sep 9, 2016

    @musm

    wow what a great package, thank you Jonathan (@onomatopellan) for linking!

  24. onomatopellan commented on Sep 9, 2016

    @onomatopellan

    Totally safe. You can see in the source code those .exe are just AutoHotKey scripts. SmartScreen complains first time you run them because those executables are not signed.

  25. cscorley commented on Sep 10, 2016

    @cscorley

    Thanks for all the suggestions in the thread. Unfortunately, none of these will work in my situation.

  26. deto commented on Sep 22, 2016

    @deto

    Just found this out - relevant to this thread.

    https://twitter.com/richturn_ms/status/779046431361343490

    Apparently true-color support is coming in an insider build.

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions