Change colors in VS Code integrated terminal
Question:
How to change colors in VS Code integrated terminal? Answer:
"workbench.colorCustomizations": {
"terminal.background":"#131212",
"terminal.foreground":"#dddad6",
"terminal.ansiBlack":"#1D2021",
"terminal.ansiBrightBlack":"#665C54",
"terminal.ansiBrightBlue":"#0D6678",
"terminal.ansiBrightCyan":"#8BA59B",
"terminal.ansiBrightGreen":"#237e02",
"terminal.ansiBrightMagenta":"#8F4673",
"terminal.ansiBrightRed":"#FB543F",
"terminal.ansiBrightWhite":"#FDF4C1",
"terminal.ansiBrightYellow":"#FAC03B",
"terminal.ansiBlue":"#00a1f9",
"terminal.ansiCyan":"#8BA59B",
"terminal.ansiGreen":"#95C085",
"terminal.ansiMagenta":"#8F4673",
"terminal.ansiRed":"#FB543F",
"terminal.ansiWhite":"#A89984",
"terminal.ansiYellow":"#FAC03B"
},
Description:
To change the integrated terminal default colors you need to modify your settings in VS Code.
- Open the settings panel with
CTRL + ,
or by using theFile -> Preferences -> Settings
menu item. - Type workbench into the search field and click on the Edit in settings.json link under the
Color Customization
block. - Insert your new color definition table:
"workbench.colorCustomizations": { "terminal.background":"#131212", "terminal.foreground":"#dddad6", "terminal.ansiBlack":"#1D2021", "terminal.ansiBrightBlack":"#665C54", "terminal.ansiBrightBlue":"#0D6678", "terminal.ansiBrightCyan":"#8BA59B", "terminal.ansiBrightGreen":"#237e02", "terminal.ansiBrightMagenta":"#8F4673", "terminal.ansiBrightRed":"#FB543F", "terminal.ansiBrightWhite":"#FDF4C1", "terminal.ansiBrightYellow":"#FAC03B", "terminal.ansiBlue":"#00a1f9", "terminal.ansiCyan":"#8BA59B", "terminal.ansiGreen":"#95C085", "terminal.ansiMagenta":"#8F4673", "terminal.ansiRed":"#FB543F", "terminal.ansiWhite":"#A89984", "terminal.ansiYellow":"#FAC03B" },
Change the prompt color
You can also change the path (prompt) color in VSCode using a PowerShell terminal. To do this you need to execute the following command in the terminal:
function prompt
{
$ESC = [char]27
"$ESC[48;2;115;75;123mPS $($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel + 1)) $ESC[0m"
}
The important part is this: [48;2;115;75;123m
where the [48;2;
is the definition prefix, 115;75;123
is the RGB color code and m
is the closing tag.
The result looks like this:
You can read more about terminal colors and workbench colors on the official VSCode page.
Reference:
VS Code terminal reference
Share "How to change colors in VS Code integrated terminal?"
Related snippets:
- Fix: Prettier stopped working in VS Code
- Split editor window in VS Code
- Change default terminal in VS Code
- Wrap selection with tag in VS Code
- Edit multiple lines at once in VS Code
- Make text uppercase in VS Code
- Associate file type in VS Code
- Change syntax highlighting in VS Code
- Search for file in VS Code
- Change indentation in VS Code
- Collapse code blocks in VS Code
- Open files always in a new tab in VS Code
- Add vertical rulers in VS Code
- Delete line without selection in VS Code
- Jump to closing bracket in VS Code
- Select all occurrences of selected word in VS Code
- Change font size in VS Code
- Toggle minimap in VS Code
- Change colors in VS Code integrated terminal
- Change file encoding in VS Code
- Disable tooltip in VS Code
- Move the sidebar panel to the right in VS Code
- Export VS Code extensions
- Toggle word wrap in VS Code
- Exclude folders from search in VS Code
- Get multiple cursors in VS Code
- Show hidden characters in VS Code
- Remove trailing spaces in VS Code
- Go back to last edited position in VS Code
- Switch between terminal and editor in VS Code
- Open VS Code with the current folder from terminal
- Navigate back to last cursor position in VS Code
- Change terminal font size in VS Code
- Duplicate line or selection in VS Code
- Format code in VS Code
- Compare two files in VS Code
- Comment out multiple lines in VSCode
- Go to line in VS Code
- Move line up or down in VS Code
Tags:
change, modify, integrated, terminal, color, style, vs code, visual studio code Technical term:
Change colors in VS Code integrated terminal