答案1
和tcolorbox
(文档):
\documentclass{article}
\usepackage[most]{tcolorbox}
\newtcbox{\mybox}[1][red]{on line,
colback=#1, colframe=#1, boxsep=0pt, boxrule=0pt, size=small, arc=1mm}
\begin{document}
\mybox{This is some} \mybox[blue!30]{text with} \mybox[green!70]{rounded corners}
\end{document}