MacOS now supports both "Light" and "Dark" mode (found in "System Preferences", "General", "Appearance").
How can I make VS Code automatically change its theme to be light or dark, when I change my MacOS "Appearance"?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityMacOS now supports both "Light" and "Dark" mode (found in "System Preferences", "General", "Appearance").
How can I make VS Code automatically change its theme to be light or dark, when I change my MacOS "Appearance"?
window.autoDetectColorScheme
)workbench preferred color theme
)Auto switch based on OS color scheme Windows and macOS support light and dark color schemes. There is a setting,
window.autoDetectColorScheme
, that instructs VS Code to listen to changes to the OS's color scheme and switch to a matching theme accordingly.To customize the themes that are used when a color scheme changes, you can set the preferred light, dark, and high contrast themes with the settings:
workbench.preferredLightColorTheme
- defaults to "Default Light+"workbench.preferredDarkColorTheme
- defaults to "Default Dark+"workbench.preferredHighContrastColorTheme
- defaults to "Default High Contrast"workbench.preferredHighContrastLightColorTheme
- defaults to "Default High Contrast Light"
I also found that property "workbench.colorTheme" is not well working with auto theme switcher. So I added it to ignore and now all works like a charm.
"workbench.colorTheme": "GitHub Light",
"settingsSync.ignoredSettings": [
"workbench.colorTheme"
],