-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Update the map between console color to VT sequences #11891
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check the color rendering on Linux and/or macOS and Windows Terminal?
|
I did check on console host and win terminal, but not Linux and macOS yet. Will do that and update here. |
|
@SteveL-MSFT Please update your review |
|
LGTM. Let's merge so we can start the build |
Sorry, something went wrong.
|
Since I have tested it on all platforms, I'm OK to merge this PR. |
|
I am OK to merge this PR. |
The task asked in the review is complete
|
🎉 Handy links: |




PR Summary
Update the map between console color to VT sequences.
The
ConsoleColortoVT Escape Sequencesmapping inVTUtils.csis not accurate, and thus is updated according to https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#text-formattingPowerShell/src/System.Management.Automation/utils/VTUtils.cs
Lines 25 to 43 in 895d4b3
The update is needed as "Bright foreground color" (e.g. bright red

\x1b[91m) is rendered differently fromboldcolor (e.g.\x1b[1;31m) in some front-end client, such as the Jupyter Notebook client.See the 3rd and 4th output below as an example:
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.