Skip to content
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

ANSI color codes working inconsistently/incorrectly in terminal #156762

Closed
j0hnm4r5 opened this issue Jul 31, 2022 · 5 comments
Closed

ANSI color codes working inconsistently/incorrectly in terminal #156762

j0hnm4r5 opened this issue Jul 31, 2022 · 5 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@j0hnm4r5
Copy link

j0hnm4r5 commented Jul 31, 2022

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.69.2
  • OS Version: macOS 12.1

Steps to Reproduce:

  1. Clone & install this Node.js repo
  2. Run npm run start in both VSCode and your OS's built-in terminal

This is a screenshot from VSCode:
VSCode

This is a screenshot from iTerm2:
iTerm2

As you can see, VSCode isn't rendering the text as blue when it is on the red background (or any other color for that matter), but it is rendering the text as blue when it is on the black background. In iTerm2 and Terminal, everything renders as expected.

This is the case across all themes, from what I can tell.

@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.69.2. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@j0hnm4r5
Copy link
Author

Sorry, that was a typo — I've updated with the correct version. Issue still persists.

@j0hnm4r5
Copy link
Author

j0hnm4r5 commented Jul 31, 2022

This is very interesting — when printing ANSI codes raw in the terminal (generated here), some of the text color is poking through but it is very muted (as if the background color is actually overlaying the text or the text is transparent).

CleanShot 2022-07-31 at 13 26 02

Using a color picker in the center of one of the Xs on each line, this is what the actual colors are rendering as:

  • MAGENTA TEXT -> rgb(212, 113, 217)
  • MAGENTA TEXT / GREEN BG -> rgb(79, 41, 81)
  • GREEN BG -> rgb(6, 63, 41)

@meganrogge
Copy link
Contributor

/duplicate #146168

@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label Aug 1, 2022
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@github-actions github-actions bot locked and limited conversation to collaborators Sep 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants