# Changing the brown color by another color

\documentclass{beamer}
%\usepackage{etoolbox} (this is necessary for old beamer versions)
%\usepackage{graphicx}
%\usepackage{color}

% Definition %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{studentbrown}{RGB}{124,71,50}

\BeforeBeginEnvironment{definition}{%
\setbeamercolor{block title}{fg=white,bg=studentbrown}
\setbeamercolor{block body}{fg=black, bg=studentbrown!20!white}
}
\AfterEndEnvironment{definition}{
\setbeamercolor{block title}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!10!bg}
}

\begin{document}

\begin{frame}

\begin{definition}
test
\end{definition}

\end{frame}

\end{document}


I want to change the brown color by another color

Change the colour in the command \definecolor{studentbrown}{RGB}{3,14,159}

\documentclass{beamer}
%\usepackage{etoolbox} (this is necessary for old beamer versions)
%\usepackage{graphicx}
%\usepackage{color}

% Definition %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{studentbrown}{RGB}{3,14,159}

\BeforeBeginEnvironment{definition}{%
\setbeamercolor{block title}{fg=white,bg=studentbrown}
\setbeamercolor{block body}{fg=black, bg=studentbrown!20!white}
}
\AfterEndEnvironment{definition}{
\setbeamercolor{block title}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!10!bg}
}

\begin{document}

\begin{frame}

\begin{definition}
test
\end{definition}

\end{frame}

\end{document}


• Thank you but please what is the general method? – Student Apr 16 at 9:52
• @Student This is general, you can use whatever color you want and give it whatever name you like – ufo Apr 16 at 9:54
• I mean how can I know the code of the orange color for example? – Student Apr 16 at 9:55
• – ufo Apr 16 at 9:58