How to fix lack of color contrast in VSCode selection tool?

24 Views Asked by At

enter image description here

In the image I have the letters "dg" highlighted in VSCode. VSCode then higlights the rest of string with a ever-so-slightly lighter color.

This is driving me insane. It's really hard to tell what I actually have selected when it does this.

What is the variable I need to change in the theme to fix this? Or is this even fixable? I can't find a particular attribute to adjust that changes that weird 'slightly lighter than the color you are using to highlight color.'

I've tried editor.selectionBackground and editor.selectionHighlightBackground but neither appear to address the issue.

I'd be happy if I could even just add a border to my selected text, but I can't find a variable for that either (Though there appears to be a border option for 'higlighting similar items'.)

1

There are 1 best solutions below

2
Mark On BEST ANSWER

I think you are looking for this Theme Color:

    "editor.wordHighlightBackground": "#fff0",

It is highlighting the word around the cursor/selection. That being the word as defined by your language server.

I set it to be transparent in the above colorCustomization by giving it the 4th hex value for opacity.

See VS Code Theme Color reference.