I have reproduced a simple example of an R Markdown presentation (PDF). I am trying to figure out the best way to change the color of inline code. Specifically, the first line is just for reference (format), the second line with \color gives the output I want to achieve, however its specification seems a bit cumbersome to me, and the third line (which would be my preferred specification) with \textcolor unfortunately gives the wrong formatting.
---
output:
beamer_presentation
---
---
- `code` and no color
- \color{red} `code` \color{black} and color
- \textcolor{red}{`code`} and wrong format
The current output is as follows:

