# Make blue box appear after pause command in beamer presentation

I am trying to the following in a beamer presentation.

Slide 1: This is
Slide 2: This is a test
Slide 3: This is BLUEBOXa testBLUEBOX


(BLUEBOXa testBLUEBOX should be written "a test" with a blue box around it.)

Here's my MWE:

\documentclass{beamer}

\usepackage{pgfplots}

\begin{document}
\begin{frame}
This is
\pause
a test\\
\pause
{This is\tikz[baseline]{
\node[fill=blue!20,anchor=base] (t1)
{a test};}
}
\end{frame}
\end{document}


First two slides are okay, but I don't know how to make the third slide turn blue after a pause command. Does it make sense to use PGF/TikZ here? Is there an easier way?

## 1 Answer

Does the following approach work for you?

\documentclass{beamer}
\usepackage{tcolorbox}

\definecolor{mycolor}{RGB}{255,255,255}

\tcbset{colframe=white,colback=white,nobeforeafter}

\begin{document}
\begin{frame}
This is \pause
\only<3>{\definecolor{mycolor}{RGB}{5,61,245}}
\tcbox[colback=white,colframe=mycolor,nobeforeafter,tcbox raise base]{a test}
\end{frame}
\end{document}