I would like to create a new command, like \alert, but in other colours and if it was possible to combine it with the comand \pmb.

I mean in the first frame shows 2x+1 and after a click \pmb{2x+1} (in blue, for instance)

• Welcome to TeX SX! What is your question about? – Bernard Dec 2 '18 at 23:25
• Welcome to TeX.SX!! Can you please give a full minimal working example. Currently we have to guess what packages etc you are using (what is \pmb?), and this makes it really hard to help you. A MWE should start with a \documentclass command, have a minimal preamble and then \begin{document}...\end{document}. It is really difficult to help you without more information. Of course, you can't define your "new alert command" but your MWE should at least confirm whether or not you are using beamer, which you never actually say. – Andrew Dec 2 '18 at 23:31
• Does this help? – user121799 Dec 3 '18 at 3:08
• Note that \pmb{2x+1} is wider than 2x+1 – egreg Dec 6 '18 at 21:33

You could define a command that uses alert, just in a different colour:

\documentclass{beamer}

\begingroup
\endgroup
}

\begin{document}

\begin{frame}