12

Working with VS code's terminal is just fine but somehow (all) text is hardly readable without peeking my nose to the screen. Anybody knows a setting to change this?

that blue blackground is very annoying

EDIT This isn't like this question because that deals with the overall theming of VS Code instead of purely the colors in the terminal window. Although a link in a comment seems to point out that it is no longer possible to style the terminal colors "outside of an applied theme..."?!

Still no luck...

enter image description here

Youp Bernoulli
  • 5,303
  • 5
  • 39
  • 59
  • Possible duplicate of [Color theme for VS Code integrated terminal](https://stackoverflow.com/questions/42307949/color-theme-for-vs-code-integrated-terminal) – HaaLeo Feb 22 '18 at 10:57
  • 1
    Hard to say, is that "terminal.selectionBackground": "#ff0000", in your "workbench.colorCustomizations" ? In settings.json. That must have gotten set somehow -- just remove it - default is a light gray. – Mark Feb 22 '18 at 10:59
  • It wasn't there yet...I added it and assigned a red color as selectionBackground without success. – Youp Bernoulli Feb 22 '18 at 13:00
  • I can change the terminal selectionBackground color with the colorCustomization that I mentioned. Odd that you cannot - do you have a terminal theme of some sort installed that is overriding that setting? None of the other coloCustomizations mentioned below will affect the selectionBackground. And I am using Powershell as well. – Mark Mar 25 '18 at 22:41
  • 1
    I had same problem, solved with this [Windows CMD settings : Use Legacy Console](https://i.stack.imgur.com/VTMxG.png) – user3014777 Mar 25 '18 at 22:37

6 Answers6

10

"terminal.selectionBackground": #ffee7f6e is the setting used to control the highlight color for the vscode built in terminal. There is no foreground option so you'll need to use a value with some opacity.

Example settings.json

{
    "workbench.colorCustomizations": {
        "terminal.selectionBackground": "#ffee7f6e"
    }
}
okor
  • 666
  • 8
  • 13
4

There is a new setting coming soon, presumably in Stable v1.68. See commit for terminal selection colors.

  "workbench.colorCustomizations": {

    "terminal.selectionBackground": "#dededc",
    "terminal.selectionForeground": "#ff0000"     // new in v1.68
  }
Mark
  • 143,421
  • 24
  • 428
  • 436
  • Thanks. Weird ! Foreground never worked with `#fff` or `#ffffff` even if white shows well in the JSON. **Edit** : my background was too bright and VS Code decided white could not be clearly visible – Abpostman1 Dec 12 '22 at 13:36
2

Use these options inside workbench.colorCustomizations:

"terminal.foreground": "#ffffff",
"terminal.ansiBlack": "#000000",
"terminal.ansiRed": "#c23621",
"terminal.ansiGreen": "#25bc24",
"terminal.ansiYellow": "#adad27",
"terminal.ansiBlue": "#492ee1",
"terminal.ansiMagenta": "#d338d3",
"terminal.ansiCyan": "#33bbc8",
"terminal.ansiWhite": "#cbcccd",
"terminal.ansiBrightBlack": "#818383",
"terminal.ansiBrightRed": "#fc391f",
"terminal.ansiBrightGreen": "#31e722",
"terminal.ansiBrightYellow": "#eaec23",
"terminal.ansiBrightBlue": "#5833ff",
"terminal.ansiBrightMagenta": "#f935f8",
"terminal.ansiBrightCyan": "#14f0f0",
"terminal.ansiBrightWhite": "#e9ebeb",

HERE is more info about color customization in Visual Studio Code.

You should avoid using any background settings as they interfere with some theme's background settings for terminal panel (VSCode 1.21.1).

Sharak
  • 888
  • 8
  • 17
  • I've been looking all over the Internet to be able to restore the original Windows terminal colors in VSCode. This is the only post I could find. The only color that's missing is: Gray. Thank you!!! – MKANET Jul 12 '19 at 17:47
  • @MKANET VSCode uses theme's colors in terminal so if you for example have `Material theme` installed then you'll also have material colors in terminal... unless you overwrite them in `workbench.colorCustomizations`. To change powershell colors outside vscode I recommend [concfg](https://github.com/lukesampson/concfg). There's a lot of built-in themes. [Mountain](https://github.com/lukesampson/concfg/blob/master/preset_examples/README.md#mountain) is great. You can further customize powershell features with [oh-my-posh](https://github.com/JanDeDobbeleer/oh-my-posh). Have fun! :) – Sharak Sep 09 '19 at 18:31
  • this will actually cause you more grief - stick to what the question is and use "terminal.selectionBackground": "the hex color number here" because if you mix up those colors, it will be next to impossible to know where they are being used.. and you will back here again.... Leave this for when you have a lot of free time in your hands :-) – AlexD Mar 31 '22 at 19:42
2

I had the same problem after updating Windows. I think that the problem is related to Windows PowerShell, because after updating, I changed the terminal to cmd.exe, and the problem went away.

Then I opened PowerShell and changed the settings. I think that my problem has been solved.

seems that changing the settings in cmd also works

zenga
  • 23
  • 6
  • It may more helpful if it is in English though – Menuka Ishan Feb 12 '19 at 08:25
  • 1
    @Menuka Ishan I think that changing the screen background color((屏幕背景)the second one in the second picture) into black may help. Sorry for that my windows doesn't have en-language package – zenga Feb 13 '19 at 15:31
  • @zjisme哈嘿 That did the trick! Changing default terminal to anything other than PowerShell (i.e. cmd) is a quick workaround, until you adjust the PowerShell color scheme. – datalifenyc Feb 07 '20 at 15:23
1

Here is what I set to make selections look more obvious both in the editor and terminal.

    "workbench.colorCustomizations": {
      "editor.findMatchHighlightBackground": "#640391",
      "editor.findMatchBackground": "#105a1c",
      "editor.selectionHighlightBackground": "#201e81",
      "terminal.selectionBackground": "#ee0028"
    }
Jianwu Chen
  • 5,336
  • 3
  • 30
  • 35
0

Just googled again for this found my own question and (re)tried the solution of @Sharak. Finally found out that the color setting I was looking for is terminal.ansiBrightBlue although this term looks misleading it is actually what is changing the text background color which I changed into the background color of the (material) theme plugin that I am using. So everything looks clear now :)

Youp Bernoulli
  • 5,303
  • 5
  • 39
  • 59