首页 > 解决方案 > 如何使用 settings.json 更改活动栏中图标的颜色

问题描述

我一直在关注 Coder Coder 的本教程,以使我的 vscode 看起来更好(教程链接https://youtu.be/pGzssFNtWXw)。根据视频,我打开了 settings.json 文件并编写了一些代码但是当我尝试更改活动栏中图标的颜色时,没有任何反应,这是我尝试用来更改的代码行颜色:"activityBarBadge.foreground": "#000000"虽然这不起作用

这是代码:

"workbench.colorCustomizations": {
        "editor.background": "#000814",
        "sideBar.background": "#000d20",
        "sideBarTitle.foreground": "#ffd60a",
        "sideBarSectionHeader.foreground": "#ffd60a",
        "activityBar.activeBackground": "#ffea81d5",
        "activityBar.background": "#22223b",
        "statusBar.background": "#ffd60a",
    }

这是我得到的结果:

在此处输入图像描述

标签: jsonvisual-studio-codethemesvscode-settings

解决方案


要更改活动栏图标颜色,请使用以下两种colorCustomizations

"activityBar.inactiveForeground"

"activityBar.foreground" // 对于活动图标


推荐阅读