Change the color of selected text

I use the default dark theme. One big problem is that when I select some text, the background color of the selected text is such that I can hardly see what is being selected. Is there any way to change the background color of the selected text?

Thanks

1 Like

Hi, this is doable by changing the color of the variable --text-selection. I have a very dark theme with so I am using rgba(230, 247, 255, 0.2); which looks like this:

image

I always look at the Inspector Pane > Sources > app.css when searching for this stuff.

2 Likes

To further expand on @burrito’s answer, you need to change the variable mentioned --text-selection which can be found inside:

  • default css if you are not using any other theme
  • <your theme.css> (for example Obsidian gruvbox.css) if you are using a community theme

Where to find these files?

Settings > Appearance > Themes section > Open themes folder (the little icon)

3 Likes

Any idea how to disable/alter the behaviour where the background colour of selected text in Edit mode is a different shade/opacity(?) than the one in Preview mode?