1

I managed to find information about how to change the color of comments for a particular theme.

In settings.json, which you can get to by pressing CTRL+P, add this

"editor.tokenColorCustomizations": {
    "[Atom One Dark]": {
        "comments": "#888888"
    }
}

If it was not already obvious, Atom One Dark is the specific theme I am using.

This theme has a further problem, assides from the comments which are near invisible by default.

Find matches are also near-invisible by default.

If it isn't obvious what that means, it means the background (highlight) color used to highlight matches which are obtained from searching for strings with "Find". (As in Find-Replace.)

VS Code has two types of find. One is a per-editor window find. You get to it by pressing CTRL+F.

The other is a global project find. You get to it using the search icon in the left hand bar, which lives under the file browser button/icon.

vs code global find

How can I change the colors used to highlight matches for both of these find operations?

starball
  • 20,030
  • 7
  • 43
  • 238
FreelanceConsultant
  • 13,167
  • 27
  • 115
  • 225
  • Besides the duplicate, see also https://stackoverflow.com/questions/35926381/change-highlight-text-color-in-visual-studio-code/53776058#53776058. – Mark Mar 26 '23 at 19:46

1 Answers1

-1

Look for the colour customization points with IDs containing "findMatch" in them. Just type "findMatch" and then trigger suggestions and you'll see the full list. The primary ones of interest to you will be the ones that start with "editor.findMatch", which will apply for both the single-editor-find matches, and also for the search (find in all files) sidebar matches. In particular, for the background highlight, you want to customize the following in your workbench.colorCustomizations:

...    
"editor.findMatchBackground": "#ff0000", # TODO. for the currently selected match.
"editor.findMatchHighlightBackground": "#ff0000" # TODO. for non-currently-selected matches.
...

There are other settings to for changing the colours for the minimap, search editor (a different thing), and terminal, which you may or may not be interested in.

starball
  • 20,030
  • 7
  • 43
  • 238