1

I would like to change the color(subtle black in my case) of the file highlighter in sidebar while a file is being edited.

Is there a property which I can change in settings.json to change it?

Please take look at the 1st screenshot, I am talking about the very subtle black highlighting of the "settings.json" in the sidebar while I am editing the file.

1st Screenshot

I would like it to be like 2nd screenshot even while editing the file but as soon as I click on the editor it changes to that subtle color shown in the 1st screenshot.

2nd Screenshot

I want to achive this while using the same theme. I hope I am making sense, please let me know if it is confusing, I will try to rephrase it.

carlfriedrich
  • 2,919
  • 1
  • 15
  • 29
Shaktimaan
  • 25
  • 4
  • have you looked at all the theme colors and tried to customize the one you need – rioV8 Mar 17 '22 at 08:03
  • Hi @rioV8, Thanks for your comment. No, I am looking for a property that helps change this(file highlight) color for this particular theme? – Shaktimaan Mar 17 '22 at 08:08
  • it is the same color-name for all themes, you have to change the right color-name – rioV8 Mar 17 '22 at 08:10
  • May I know which particular property you're talking about? – Shaktimaan Mar 17 '22 at 08:16
  • there are a finite number of theme colors that will apply to the tree list, try the ones that have the word `back` in there name – rioV8 Mar 17 '22 at 09:27

2 Answers2

1

Open your JSON settings and add the following lines:

"workbench.colorCustomizations": {
    "list.inactiveSelectionBackground": "#434343",
}

If you want this changed for just a single theme, wrap the inner setting in a [theme] block:

"workbench.colorCustomizations": {
    "[Your Theme Name]": {
        "list.inactiveSelectionBackground": "#434343",
    }
}
carlfriedrich
  • 2,919
  • 1
  • 15
  • 29
  • this will change it for all themes, better to customize it for a particular theme – rioV8 Mar 17 '22 at 09:26
  • @rioV8 True, I've updated the answer accordingly. – carlfriedrich Mar 17 '22 at 09:32
  • Hi @carlfriedrich Thank you!! This is what I was looking for. I mean the type of solution. Unfortunately this `list.inactiveSelectionBackground` doesn't change anything at all, I tried it for all themes and also for particular theme it doesn't work. I wish I could share a screenshot in the comment. – Shaktimaan Mar 18 '22 at 09:57
  • Hi @carlfriedrich, My bad, I was using `list.inactiveFocousBackground` instead by mistake. Now it works. Thanks again!! – Shaktimaan Mar 21 '22 at 03:55
0

I also found a function( but the solution that ullas kunder gives is much easier):

ctrl+shift+p, search "developer:generate color...". When you come in, you will find all kinds of color settings. We can add some codes and change colors, too.

1y0una
  • 91
  • 5
  • This generates a new theme which then would have to be installed before the settings in there take effect. Seems overkill if you just want to change one color. – carlfriedrich Mar 17 '22 at 09:29
  • Hah that' true. For if you want to save the change it will let you choose a floder to save it. You comment is very useful! – 1y0una Mar 17 '22 at 09:36