VS Code terminal (selected) text background color

大憨熊 提交于 2020-08-04 05:11:32

问题


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?

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...


回答1:


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).




回答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




回答3:


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 :)




回答4:


"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"
    }
}


来源:https://stackoverflow.com/questions/48925243/vs-code-terminal-selected-text-background-color

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!