Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code terminal colors are screwy

I'm using the default theme. The terminal's colors are impossible to read, make no sense, and are inconsistent. I've tried switching themes but they're terrible in all the themes.

Here's what it looks like in the default. Are you able to read my yellow input against the gray background? And why isn't there a black background everywhere? Powershell terminal window

I realize there are settings that can manually set the fore/background colors. But I'm thinking something is broken for me because of how screwy the terminal behaves.

For example, here's what I see when I first start the terminal, type a bunch of stuff, backspace to delete half of it, resize the terminal pane, then delete some more. Notice how some of the deleted spaces have yellow and some have gray. Also notice how the area where the CWD would be shown is all black. Initial view

Here are the contents of my settings.json file:

{
    "window.zoomLevel": 0,
    "git.enableSmartCommit": true,
    "workbench.startupEditor": "newUntitledFile"
}

What needs fixing, and how?


Edit:

Just to satisfy your curiosity, I added this to my settings.json file:

"workbench.colorCustomizations": {
    "terminal.foreground": "#ffffff",
    "terminal.background": "#000000"
}

No joy: Ugly stuff still

like image 378
Matt Thomas Avatar asked Feb 26 '19 14:02

Matt Thomas


1 Answers

On March 8th 2022 the default value for the integrated terminal "minimum contrast ratio" was updated from 1 (no effect) to 4.5 (minimal effect). Depending on your color settings and what is being displayed, this can cause your integrated terminal foreground colors to be wrong.

To disable this feature, override the default in your own settings.json file:

  "terminal.integrated.minimumContrastRatio": 1
like image 199
TheZanke Avatar answered Oct 20 '22 15:10

TheZanke