I adapt the solution in Set the width of a fcolorbox for a multiparagraph statement - there should be a uniform colour box encompassing multiple paragraphs:
\documentclass{beamer}
\usepackage{xcolor}
\usepackage{xparse}
\NewDocumentCommand{\framecolorbox}{oommm}
{% #1 = width (optional)
% #2 = inner alignment (optional)
% #3 = frame color
% #4 = background color
% #5 = text
\IfValueTF{#1}
{%
\IfValueTF{#2}
{\fcolorbox{#3}{#4}{\makebox[#1][#2]{#5}}}
{\fcolorbox{#3}{#4}{\makebox[#1]{#5}}}%
}
{\fcolorbox{#3}{#4}{#5}}%
}
\begin{document}
\framecolorbox[4cm]{blue}{blue!40}{%
what do I
do here?
}
\end{document}
The compilation fails:
Runaway argument?
{what do I
! Paragraph ended before \framecolorbox was complete.
<to be read again>
\par
l.21
?
How to fix?
\fcolorbox{blue}{green}{\parbox{5cm}{some text here}}– David Carlisle Oct 25 '21 at 07:35\\instead of double Enter. – Viesturs Oct 26 '21 at 06:18\\never ends a paragragh, just forces a newline, but you can use\endgraf– David Carlisle Oct 26 '21 at 07:51