Avatar of bgraves
bgravesFlag for United States of America asked on

Where is VS Code getting this color?

Windows Server 2019 VSCode 1.59.1 PowerShell 7.1.4 (same with PS 5.1)

Uninstall PS 7, VS Code, reinstall. $Profile files are all empty. settings.json is empty.

Typing 1 character on terminal command line is ok (plain character on terminal background). Typing a second or more characters gets this strange highlight (background turns magenta, same character color). I have the same setup across 4 computers and they are ok, just this one on the Server has this problem. The weird color highlighting makes it very hard to read!


Note PS 5.1, PS 7.1 by themselves do not do this - just in VS Code!

* VS CodePowershell

Avatar of undefined
Last Comment
bgraves

8/22/2022 - Mon
Scott Fell

Do you have the powershell module for VS Code?  That change my colors.

You can change the themes
https://code.visualstudio.com/docs/getstarted/themes
https://code.visualstudio.com/docs/getstarted/themes

ASKER
bgraves

Yes, I do have the powershell module installed.
I have the same setup on 4 different computers, only the one instance has this strange coloring behavior.
I changed to the light theme, and still get exactly the same colors on the command line as I do with the dark theme.
So I don't think its the themes or the preferences (i have tried all that looks interesting).

There is some other place that is influencing just the Visual Studio Code terminal and any other,Powershell Window does not have this either.!!




Scott Fell

I don't use terminal here so this is new.

I found this https://code.visualstudio.com/api/extension-guides/color-theme

File -> Preferences -> Settings

At the top, there is a search, type in color.  Under Features, click on Terminal. Check that the options and settings.json in the machine that does not work is the same or different than the one that does. You may be able to see something there right away. I have:

I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER
bgraves

Thanks, Scott Fell, all good ideas but none of them cure the problem.

I have tried copying the settings.json from other machines that are ok - no fix!
I also tried completely deleting everything in settings.json - still no fix.
It is interesting that I can drag the mouse over output text and not get the weird magenta effect.
The affect ONLY happens when typing and only at the second and subsequent characters!
Scott Fell

I am at a loss my friend.
ASKER
bgraves

Started fresh in another Windows 2019 server.
There was no problem in VS Code until using this PowerShell color tool caused the problem:
   "concfg-COLOR Tool" import xxxxxx.json WHERE this line occurs:
         "screen_colors": "dark_yellow,dark_magenta",
Changing the dark_magenta to dark_blue definitely changes the VS Code Terminal background
but changing to the screen backgound color we actually used #012456 did not work!!
So finally I just left it alone.

Then for VS Code, in Settings.json, changing "ansiMagenta" to the background color we use:
      // "terminal.ansiMagenta": "#d338d3",
     "terminal.ansiMagenta": "#012456",
did work. BUT WHY? if the settings.json were cleared out and I still had the problem.?
What is the relationship between "terminal.ansiMagenta" and the "dark_magenta" from the "concfg-COLOR Tool"?

So many strange mysteries but at least its working now!!
Thanks to Scott for his advice.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
bgraves

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question