Theme Color | Visual Studio Code Extension API
AI agents: See llms.txt for documentation discovery and navigation. Documentation articles are also available as Markdown by appending .md to the article URL. Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. Theme Color View as Markdown Ask in VS Code Ask in VS Code Insiders You can customize your active Visual Studio Code color theme with the workbench.colorCustomizations user setting . { "workbench.colorCustomizations" : { "activityBar.background" : "#00AA00" } } Note : If you want to use an existing color theme, see Color Themes where you'll learn how to set the active color theme through the Preferences: Color Theme dropdown ( ⌘K ⌘T (Windows, Linux Ctrl+K Ctrl+T ) ).
Theme colors are available as CSS variables in webviews , and an extension is available which provides IntelliSense for them. Color formats Color values can be defined in the RGB color model with an alpha channel for transparency. As format, the following hexadecimal notations are supported: #RGB , #RGBA , #RRGGBB and #RRGGBBAA . R (red), G (green), B (blue), and A (alpha) are hexadecimal characters (0-9, a-f or A-F).
The three-digit notation ( #RGB ) is a shorter version of the six-digit form ( #RRGGBB ) and the four-digit RGB notation ( #RGBA ) is a shorter version of the eight-digit form ( #RRGGBBAA ). For example #e35f is the same color as #ee3355ff . If no alpha value is defined, it defaults to ff (opaque, no transparency). If alpha is set to 00 , the color is fully transparent. Some colors should not be opaque in order to not cover other annotations.
Check the color descriptions to see to which colors this applies. Contrast colors The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast. contrastActiveBorder : An extra border around active elements to separate them from others for greater contrast. contrastBorder : An extra border around elements to separate them from others for greater contrast.
Base colors focusBorder : Overall border color for focused elements. This color is only used if not overridden by a component. foreground : Overall foreground color. This color is only used if not overridden by a component. disabledForeground : Overall foreground for disabled elements. This color is only used if not overridden by a component. widget.border : Border color of widgets such as Find/Replace inside the editor. widget.shadow : Shadow color of widgets such as Find/Replace inside the editor. selection.background : Background color of text selections in the workbench (for input fields or text areas, does not apply to selections within the editor and the terminal). descriptionForeground : Foreground color for description text providing additional information, for example for a label. errorForeground : Overall foreground color for error messages (this color is only used if not overridden by a component). icon.foreground : The default color for icons in the workbench. sash.hoverBorder : The hover border color for draggable sashes.
Window border The theme colors for VS Code window border. window.activeBorder : Border color for the active (focused) window. window.inactiveBorder : Border color for the inactive (unfocused) windows. The window border colors are only supported on macOS and Linux (not Windows) and only when the custom title bar is enabled ( "window.titleBarStyle": "custom" ). Modern UI colors These colors customize workbench surfaces and controls when the modern UI is enabled. surface.background : Background color of framed container surfaces ("cards"), such as the floating workbench panels in the modern layout. surface.foreground : Foreground color of framed container surfaces ("cards"), such as the floating workbench panels in the modern layout. surface.border : Border color of framed container surfaces ("cards"), such as the floating workbench panels in the modern layout. editor.border : Border color of the editor surface in the modern layout. modernPanel.border : Border color of the panel surface when the modern UI is enabled. modernSash.gripForeground : Color of the grip handles marking the resizable boundaries between workbench parts when the modern UI is enabled. modernTab.activeBackground : Background color of active tabs when the modern tab style is enabled. modernTab.activeForeground : Foreground color of active tabs when the modern tab style is enabled. modernTab.hoverBackground : Background color of tabs when hovering and the modern tab style is enabled. modernTab.hoverForeground : Foreground color of tabs when hovering and the modern tab style is enabled. modernEditorTab.activeBackground : Background color of active editor tabs when the modern tab style is enabled. modernEditorTab.activeActionBackground : Opaque background color of tab actions on active editor tabs when the modern tab style is enabled. modernEditorTab.activeForeground : Foreground color of active editor tabs when the modern tab style is enabled. modernEditorTab.inactiveBackground : Background color of inactive editor tabs when the modern tab style is enabled. modernEditorTab.hoverBackground : Background color of editor tabs when hovering and the modern tab style is enabled. modernEditorTab.hoverActionBackground : Opaque background color of tab actions on editor tabs when hovering and the modern tab style is enabled. modernEditorTab.hoverForeground : Foreground color of editor tabs when hovering and the modern tab style is enabled. modernEditorTab.activeHoverBackground : Background color of active editor tabs when hovering and the modern tab style is enabled. modernEditorTab.activeHoverActionBackground : Opaque background color of tab actions on active editor tabs when hovering and the modern tab style is enabled. modernEditorTab.selectedActionBackground : Opaque background color of tab actions on selected editor tabs when the modern tab style is enabled. modernActivityBar.background : Background color of the Activity Bar in the default side position when the modern UI is enabled. modernActivityBar.inactiveBackground : Background color of the Activity Bar in an inactive window when it is in the default side position and the modern UI is enabled. modernActivityBarItem.activeBackground : Background color of active Activity Bar items in the default side position when the modern UI is enabled. modernActivityBarItem.activeForeground : Foreground color of active Activity Bar items in the default side position when the modern UI is enabled. modernActivityBarItem.hoverBackground : Background color of Activity Bar items in the default side position when hovering and the modern UI is enabled. modernActivityBarItem.hoverForeground : Foreground color of Activity Bar items in the default side position when hovering and the modern UI is enabled. modernActivityBar.border : Border color of the Activity Bar in the default side position when the modern UI is enabled. modernUI.shellBackground : Background color of the shell visible around floating workbench surfaces when the modern UI is enabled. modernUI.inactiveShellBackground : Background color of the shell visible around floating workbench surfaces when the window is inactive and the modern UI is enabled.
Text colors Colors inside a text document, such as the welcome page. textBlockQuote.background : Background color for block quotes in text. textBlockQuote.border : Border color for block quotes in text. textCodeBlock.background : Background color for code blocks in text. textLink.activeForeground : Foreground color for links in text when clicked on and on mouse hover. textLink.foreground : Foreground color for links in text. textPreformat.foreground : Foreground color for preformatted text segments. textPreformat.background : Background color for preformatted text segments. textPreformat.border : Border color for preformatted text segments. textSeparator.foreground : Color for text sepa
The rest of this page is on the live site.