-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
default shortcut on Windows remaps ANSI colors 35,36 #4266
Comments
@refack Thanks for your report! Could you please test with latest PowerShell Core version - Beta.4? |
The |
@refack Thanks for the test! |
FWIW - some background: This behavior is actually intentional. Prior to the V1 release of PowerShell, the UI designers picked colors for the PowerShell console. Since the background color they chose wasn't part of the standard palette, one of the less used standard colors was remapped to produce what the designers wanted. It's been shipping that way ever since. |
Designers 🤷♂️ . |
conhost in Window 10 1607 and higher IIRC has some ANSI support. Try: $E = [char]0x1b; "$E[35;1;40m" If you're using PowerShell Core then you can use: "`e[35;1;40m" It's not 100% though. As I type commands I can see the original blue as the background. |
@rkeithhill interesting results |
I don't know about a tutorial but I use as a reference this MSDN page: https://msdn.microsoft.com/en-us/library/windows/desktop/mt638032(v=vs.85).aspx |
Does that mean there's no chance of it changing? Not being able to see one of the standard colours seems like a pretty major defect for a console (which I guess is why it's remapped in the powershell shortcut, see nodejs/node#14243 (comment)).
This seems like a reasonable solution, any chance of it happening? |
I think the default fg/bg colors should be decoupled from the 16 ANSI colors, and instead be separately be defined. That's how pretty much all Unix terminals do it. |
As best as I can tell, neither the cmd.exe shortcut nor the PSCore6 shortcut modifies the magenta color so it's only an issue with Windows PowerShell, correct? As @BrucePay mentioned, for Windows PowerShell, this is by-design and changing it now is a breaking change. |
This should probably go to the Windows group, but Github is a better platform.
Ref: nodejs/node#14243
Steps to reproduce
Expected behavior
megenta output
![image](https://user-images.githubusercontent.com/96947/28250472-83dd43da-6a37-11e7-91c8-682c6989a63f.png)
Actual behavior
dark blue output (same as background)
![image](https://user-images.githubusercontent.com/96947/28250572-c85d6772-6a39-11e7-920b-eb3540a71dd3.png)
Environment data
The default powershell
.lnk
remaps colors 35, and 36The text was updated successfully, but these errors were encountered: