您可以通过三种方法将 VS Code 主题变为白色:更改设置中的配色方案为 "Light+ (default light)"。在 Marketplace 中安装白色主题,如 White Carbon、Light Night或 Tomorrow Night Light。使用主题编辑器将 "tokenColors" 部分中的 "foreground" 和 "background" 值更改为白色。

如何将 VS Code 主题变为白色
方法 1:更改设置
- 打开 VS Code 设置(Ctrl + , 或 Cmd + ,)。
- 在搜索栏中输入 "theme"。
- 在 "配色方案" 下拉菜单中选择 "Light+ (default light)"。
方法 2:安装白色主题
-
在 VS Code Marketplace 中搜索白色主题,例如:
- White Carbon
- Light Night
- Tomorrow Night Light
- 在 Marketplace 中找到一个您喜欢的主题,然后点击 "Install" 按钮。
- 安装完成后,打开 VS Code 设置并选择 "Light+ (default light)"。
方法 3:使用主题编辑器
-
打开 VS Code 主题编辑器:
- Windows/Linux: Ctrl + Shift + P,输入 "Preferences: Open Theme JSON"。
- MacOS: Cmd + Shift + P,输入 "Preferences: Open Theme JSON"。
- 在 JSON 文件中找到 "tokenColors" 部分。
- 将 "foreground" 和 "background" 变量的值更改为白色,例如:
"tokenColors": [
{
"name": "Foreground",
"scope": [],
"settings": {
"foreground": "#ffffff"
}
},
{
"name": "Background",
"scope": [],
"settings": {
"background": "#ffffff"
}
}
]- 保存 JSON 文件。










