VS Code 更换背景色

有的小伙伴习惯用淡绿色作为背景,虽说实际上没有护眼的效果,但是看起来眼睛还是比较舒服的。我们来看一下在VS Code中如何更换代码区的背景色。

具体步骤

  1. 找到主题所在路径
    VS Code Theme所在路径是:安装路径/resources/app/extensions
    进入目录,滚动条拉到最下面,可以看到theme开头的文件夹,这些就是主题相关文件存放的位置了
    theme文件夹
  2. 修改当前使用的主题对应的json文件
    我使用的是默认主题中的Light(Visual Studio)
    对应的文件是:/theme-defaults/themes/light_defaults.json
    内容如下:
{
    "$schema": "vscode://schemas/color-theme",
    "name": "Light Default Colors",
    "colors": {
        "editor.background": "#FFFFFF",
        "editor.foreground": "#000000",
        "editor.inactiveSelectionBackground": "#E5EBF1",
        "editorIndentGuide.background": "#D3D3D3",
        "editorIndentGuide.activeBackground": "#939393",
        "editor.selectionHighlightBackground": "#ADD6FF80",
        "editorSuggestWidget.background": "#F3F3F3",
        "activityBarBadge.background": "#007ACC",
        "sideBarTitle.foreground": "#6F6F6F",
        "list.hoverBackground": "#E8E8E8",
        "input.placeholderForeground": "#767676",
        "settings.textInputBorder": "#CECECE",
        "settings.numberInputBorder": "#CECECE",
        "statusBarItem.remoteForeground": "#FFF",
        "statusBarItem.remoteBackground": "#16825D"
    }
}

可以看到editor.background项的值是白色#FFFFFF,果断改成淡绿色:

"editor.background": "#CCEED0",

改完重启VS Code即可

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容