title: VS Code: How to change text color of selected text?
body: <p>I am trying to change the selected text of highlighted text in VS Code. There are 3 ways I can select text.</p>
  
  <p>My current editor settings are:</p>
  
  <pre><code>    "workbench.colorCustomizations": {
          "editor.selectionHighlightBackground": "#e8fc37",
          "editor.wordHighlightBackground": "#e8fc37",
      },
  </code></pre>
  
  <p>(1) When I <em>first</em> click or select a string of text,then hiting <code>CMD+d</code>, I can select the next occurrences of a string of text:</p>
  
  <p><a href="https://i.stack.imgur.com/4zzPn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4zzPn.png" alt="enter image description here"></a></p>
  
  <p>(2) But if I try to select the text by first searching for it in the same file(CMD+f), then selecting the next occurrences (pressing CMD+d), the color doesn't highlight. The text does in fact highlight, but it's <strong>very</strong> difficult to tell. You can only really tell by looking in the gutter where the line numbers are.</p>
  
  <p><a href="https://i.stack.imgur.com/LyrlY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LyrlY.png" alt="enter image description here"></a></p>
  
  <p>(3) When I use the Search command (searching among all files; CMD+Shift+f), and I click on one of the search results, even though it clearly tells me what line the text is one, I can't easily tell where in the line the text is being highlighted. This is tricky when the line is longer or filled special characters.</p>
  
  <p><a href="https://i.stack.imgur.com/EgdPK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EgdPK.png" alt="enter image description here"></a></p>
  
  <p>In all these cases, I would like to have the selected text, whether I'm selecting it by using <code>CMD+d</code> or clicking on a result in a search side bar to have the text be dark gray in the foreground, and yellow in the background. I have been able to achieve the background color change, but don't know the editor key for any of the foreground texts.</p>
  
  <p>How can I get selected text to be yellow in the background (which I have done) with dark gray text?</p>