highlight-text is a Quarto extension that colours text, backgrounds, and borders in a document, for HTML, LaTeX, Typst, Docx, PowerPoint, Reveal.js, and Beamer.
quarto add mcanouil/quarto-highlight-text@2.3.1This will install the extension under the _extensions subdirectory.
If you're using version control, you will want to check in this directory.
The full documentation lives at https://m.canouil.dev/quarto-highlight-text/: every attribute and its aliases, the accepted colour values, brand colours, light and dark themes, per-format support, and the LaTeX line-wrapping notes.
example.qmd is a short, standalone starting point you can copy, rendered to every supported format and attached to each release.
MIT.