I use a custom rstudio theme called "atom One Dark". You can download it from https://github.com/tkrabel/rstudio_atom_theme/blob/master/atom.rstheme. I was able to change the colour of the highlighted brace by following these steps:
- Download the "atom.rstheme" text file from https://github.com/tkrabel/rstudio_atom_theme/blob/master/atom.rstheme (or any custom rstheme file; see e.g. https://github.com/mkearney/rstudiothemes)
- Open the file ("atom.rstheme") in a text editor
- Change:
.ace_bracket {
margin: 0 !important;
border: 0 !important;
background-color: rgba(128, 128, 128, 0.5);
}
to:
.ace_bracket {
margin: 0 !important;
border: 0 !important;
background-color: rgba(73, 204, 37, 0.5);
}
- Also change:
.ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid #4B4E55
}
to:
.ace_marker-layer .ace_bracket {
margin: -1px 0 0 -1px;
border: 1px solid #25c235
}
(These edits change the highlighted brace colour from grey to bright green; choose your hex code / rgb code accordingly)
- Then, restart R and reload the edited theme file. To do this, click on
Tools> Global Options> Appearance and select a theme that isn't "One Dark", then add the 'updated' "One Dark" theme file (Tools> Global Options> Appearance> Add and select the "atom.rstheme" from the file explorer)
- Restart R and you have coloured highlighting, e.g.

If you're on macOS, your default themes are stored in /Applications/RStudio.app/Contents/Resources/resources/themes; you can also copy one of these files and make the same changes to the '.ace_bracket' parameter e.g. copy vibrant_ink.rstheme to updated_vibrant_ink.rstheme, edit the '.ace_bracket' colors in "updated_vibrant_ink.rstheme" and then add the theme as above (Tools>Global Options>Appearance>Add).
If you're on Windows, apparently the default themes are stored at C:\Users\<your user account>\Documents\.R\rstudio\themes (re this article).