Different frames in one beamer presentation

I need to prepare a beamer presentation in which I shall have multiple kinds of frames (Discussing frame, Formalizing frame, Problems Frame, etc.). They are simple frames, essencialy, a white frame with the words "Discussing", "Formalizing", etc. in a rectangle in the right top of the frame, but this rectangle, in each kind of frame shall be in a color (discussing is blue, problems are green, etc.).

I tried to addapt this but I was not able to change colors or write in the rectangle :(

• The linked item has been deleted, so there is no useful information there. Please incorporate the actual content from that link (which was posted by you). Jul 25 '19 at 15:08

In the following code, I have added an optional argument to \begin{frame}. If no argument is given, the resultign slide is just white, if one of the arguments Discussing, Problems or Formalizing is given, the respective word is added in a colored rectangle:

\documentclass{beamer}
\usepackage{etoolbox}

\setbeamercolor{mydiscussingcolor}{fg=white,bg=blue}
\setbeamercolor{myproblemscolor}{fg=black,bg=green}
\setbeamercolor{myformalizingcolor}{fg=white,bg=red}

\BeforeBeginEnvironment{frame}{%

\makeatletter
\define@key{beamerframe}{Discussing}[true]{%
\begin{beamercolorbox}[wd=.25\paperwidth,ht=20pt,dp=3ex,center]{mydiscussingcolor}%
\Large Discussing %
\end{beamercolorbox}%
}}
\define@key{beamerframe}{Problems}[true]{%
\begin{beamercolorbox}[wd=.25\paperwidth,ht=20pt,dp=3ex,center]{myproblemscolor}%
\Large Problems %
\end{beamercolorbox}%
}}
\define@key{beamerframe}{Formalizing}[true]{%
\begin{beamercolorbox}[wd=.25\paperwidth,ht=20pt,dp=3ex,center]{myformalizingcolor}%
\Large Formalizing %
\end{beamercolorbox}%
}}
\makeatother

\begin{document}

\begin{frame}[Discussing]
\frametitle{title}
\end{frame}

\begin{frame}[Problems]
\end{frame}

\begin{frame}
\frametitle{another title}
\end{frame}

\begin{frame}[Formalizing]
\end{frame}

\end{document}

• PERFECT!!!! Thank you very much!!! Jul 25 '19 at 18:57