[Tex/LaTex] Changing \eqref colors in Beamer

beamercolor

I want to change my equation reference color to \usebeamercolor[fg]{structure}. I use it as {\usebeamercolor[fg]{structure}\ref{eqn1}} but I want to make this as my default color and just use \eqref{eqn1} to get the same output.

Also, where can I find the list of colors that beamer uses?
For example, for example block header, alert block header, theorem block header.

\documentclass[10pt]{beamer}

\usepackage{amsfonts}


\usetheme{Warsaw}
\usecolortheme{whale}

\begin{document}

\begin{frame}{}

\begin{equation}
y^{\prime}=p(x)y\label{eqn1}
\end{equation}
{\usebeamercolor[fg]{structure}\eqref{eqn1}} is a linear differential equation of first order.

\end{frame}

\end{document}

Best Answer

Just redefine \eqref to incorporate the color change:

\documentclass[10pt]{beamer}

\usepackage{amsfonts}

\usetheme{Warsaw}
\usecolortheme{whale}

\makeatletter
\renewcommand\eqref[1]{%
  \textup{\usebeamercolor[fg]{structure}\tagform@{\ref{#1}}}%
}

\begin{document}

\begin{frame}{}

\begin{equation}
y'=p(x)y\label{eqn1}
\end{equation}
\eqref{eqn1} is a linear differential equation of first order.

\end{frame}

\end{document}

enter image description here