-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting colours 17+ in shell on Windows using conpty #2074
Comments
Have you tried setting the indexed_colors in the Alacritty configuration? I'm not familiar with what the base16 script does. |
My understanding is it uses escape sequences to change the terminal's colours at runtime. For example:
However in Alacritty: The same commands in Wsltty: Also I should note that setting these colours also works fine in the OSX version of Alacritty. |
I also just realised I totally left out I'm using |
I can't reproduce this on linux, so I'd assume that this is a Windows issue. Could you verify that the ConPTY api is actually used by starting Alacritty using I'd also like to know if any other shell works for you? It seems like |
Also potentially related: #1206. I don't think this should be super relevant though, since we're just talking about one specific escape sequence which seems to work fine for me on Linux, so it shouldn't be related to Alacritty support. |
Sure: The same issue occurs when using No colours seem to work and it prints a bunch of backslashes at the beginning (maybe something in my bashrc? Don't know) |
Also to be clear the escape sequence for setting the colours works for colours 1-16, just not anything in the 256 colour space. |
Could you test setting these colors in the If the indexed colors work, we should be able to rule that out. |
No problem - I've tried setting colour number 17 to red using And tried echoing it out again: So it doesn't seem to set those colours at all. I also tried doing some other tests - I completely disabled my bashrc to make sure it was nothing I was doing - same issue, and I also tried disabling conpty, still the same issue. It seems like neither the escape codes nor the |
Is the config file printed by |
I'm sure the config file is the one being used as it's the same one I was using the enable/disable Conpty. I haven't tried using it without WSL, I'll try and find a way of testing |
I believe the WinPTY does not support colors higher than 16bit, but I thought the ConPTY API did. |
I think JDTX has identified the problem in his recent comment in #1792. That changelog suggests this is a bug in microsoft's side of the conpty code that's already fixed in insider builds. Most users would therefore see this fix in the Windows 10 19H1 release. (I'm not currently running an insider build, but I could switch over to one and verify this is fixed if you like.) |
Closing this since it sholud be fixed then. Also since it kinda is a duplicate of #1792. If anyone can't get this to work with the latest conpty release, please let me know and I can re-open. |
Yep I agree, looking at that Windows blog I belive this is what should fix this issue microsoft/terminal#313 |
@chrisduerr I can confirm that the issue still exists, I'm using Windows 10 19H1, build number 18362 [released today] and I have run the same colortest, it fails and produces the same output as the OP. I have enabled the experimental ConPty support in the config.yml file and also tested it if it's indeed under ConPty. Can you please reopen the issue? |
@saifali96 Which shell did you test this in? Should probably try with bash to make sure. I don't know if cmd does that stuff at all. |
@chrisduerr I ran it in fish, but I also just ran it in bash, still doesn't work. |
Would you mind posting the config you've used to test this? |
Do you mean the
|
I do. I'd assume you've added colors there if you want to test if setting colors past 16 works? |
Yeah, that color script will not show anything special unless you've got those colors actually set. So I'd assume it's working as intended. |
No, sorry I haven't. How does one go about adding colors? |
Take a look at the |
@chrisduerr , thank you very much for your help, unfortunately I'm unable the set colors, here's what is in my config file: indexed_colors:
- { index: 16, color: '0xff00ff' }
- { index: 17, color: '0xdc9656' }
- { index: 18, color: '0xDC9656' }
- { index: 19, color: '0xff00ff' }
- { index: 20, color: '0xb77ee0' }
- { index: 21, color: '0xe8e8e8' } And here's the output still, I have tried to add the colors from the script as well as well an example/default color: |
I'll take a look to verify, thanks. |
I reopened to take a look myself @davidhewitt, though it looks like everything's good. Thanks for testing. |
I've been reading through issues trying to figure out whether this is supposed to work or not, but I'm honestly not sure.
Using the Conpty setting on windows definitely enables showing of 256 colours, but using e.g. https://github.com/chriskempson/base16-shell to set colours 16..21 doesn't seem to work. The output of the provided colortest script in base16-shell shows they are not being set, whereas they work fine in e.g. wsltty.
Alacritty:
Wsltty:
The text was updated successfully, but these errors were encountered: