1

According to this answer, we have

\documentclass[xcolor=dvipsnames]{beamer}
\usecolortheme[named=blue]{structure}

%------------------------\AtBeginSubsection[]----------------------
\AtBeginSubsection[]{
\begin{frame}<beamer>[noframenumbering,plain]{Outline}
\transsplitverticalout
\tableofcontents[currentsection,currentsubsection]
\end{frame}
}

\usetheme{Madrid}
%----------------------------------------------------------------
\setbeamercolor{author in head/foot}{bg=blue!30!black}
\setbeamercolor{title in head/foot}{bg=yellow!30!white,fg=blue!30!black}
\setbeamercolor{page number in head/foot}{bg=blue!30!black,fg=white}
%----------------------------------------------------------------

\title[The essential numerical range and the Olsen problem]{The
essential numerical range and the Olsen problem}
\author[{Student} (University of ....)]{Student}

\useoutertheme{shadow}
\usepackage{tikz}
\usetikzlibrary{shadings}
%-----------------------------------------------------------------------
\colorlet{titleleft}{blue!30!black}
\colorlet{titleright}{blue!30!black}

\setbeamercolor*{frametitle}{fg=white}

\setbeamercolor*{subsection in head/foot}{bg=yellow!30!white,fg=blue!30!black}
%-----------------------------------------------------------------------
\makeatletter
\pgfdeclarehorizontalshading[titleleft,titleright]
{beamer@frametitleshade}
{\paperheight}{%
color(0pt)=(titleleft);
color(\paperwidth)=(titleright)}
\makeatother

%-----------------------------footline-----------------------------
\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
%            \hspace*{3em}
%            \insertframenumber{} / \inserttotalframenumber\hspace*{1ex}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,center]{page number in head/foot}%
%            \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}
\insertframenumber{} / \inserttotalframenumber
\end{beamercolorbox}%
}%
\vskip0pt%
}
%--------------------------------------------------
\colorlet{myblue}{blue!30!black}
\colorlet{myyellow}{yellow!30!white}

\setbeamercolor{author in head/foot}{bg=myblue}
\setbeamercolor{title in head/foot}{bg=myyellow,fg=myblue}
\setbeamercolor{page number in head/foot}{bg=myblue,fg=white}

\setbeamercolor*{subsection in head/foot}{bg=myyellow,fg=myblue}

\colorlet{titleleft}{myblue}  %<----- left half of frame title background color
\colorlet{titleright}{myblue} %<----- right half of frame title background color
\setbeamercolor*{frametitle}{fg=white} %<---- Color of the frame title text
%---------------------------------------------------------------
\begin{document}
\section{Introduction}
\section{Positive linear relations}
\section{Lattice linear relations}
\section{Domination by a positive compact relation.}
\subsection{Linear relation}
\subsection{Riesz spaces}
\begin{frame}{Linear relations}

\end{frame}

\end{document}

I want to change the color of the title frame to for example the grey instead of blue and the color of sections to blue instead of black.

enter image description here

1

To change the background color of the section titles in the header from black to your blue, add \setbeamercolor*{section in head/foot}{bg=myblue, fg=white} and to change the background color of the frame title from your blue to gray, replace \colorlet{titleleft}{myblue} \colorlet{titleright}{myblue} by \colorlet{titleleft}{gray} \colorlet{titleright}{gray}.

As A Diyanat already explained in their answer, bg changed the background color and fg changed the font color.

enter image description here


As requested in teh comments, here is the complete MWE with some hopefully helpful explanatory annotations:

\documentclass[xcolor=dvipsnames]{beamer}
\usecolortheme[named=blue]{structure}

%------------------------\AtBeginSubsection[]----------------------
\AtBeginSubsection[]{
\begin{frame}<beamer>[noframenumbering,plain]{Outline}
\transsplitverticalout
\tableofcontents[currentsection,currentsubsection]
\end{frame}
}


\usetheme{Madrid}
\useoutertheme{shadow}

%-----------------custom frame title background--------------------
\makeatletter
\pgfdeclarehorizontalshading[titleleft,titleright]
{beamer@frametitleshade}
{\paperheight}{%
color(0pt)=(titleleft);
color(\paperwidth)=(titleright)}
\makeatother

%-----------------------------footline-----------------------------
\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
%            \hspace*{3em}
%            \insertframenumber{} / \inserttotalframenumber\hspace*{1ex}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,center]{page number in head/foot}%
%            \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}
\insertframenumber{} / \inserttotalframenumber
\end{beamercolorbox}%
}%
\vskip0pt%
}



%%%%% Custom color definitions used in the head and foot line of the frames %%%%%
\colorlet{myblue}{blue!30!black} %<----- define the new color myblue
\colorlet{myyellow}{yellow!30!white} %<----- define the new color myyellow

\setbeamercolor{author in head/foot}{bg=myblue} %<----- background color of author in footline
\setbeamercolor{title in head/foot}{bg=myyellow,fg=myblue} %<----- background color and font color for presentation title in footline 
\setbeamercolor{page number in head/foot}{bg=myblue,fg=white} %<----- background and font color fot page numbers in the footline

\setbeamercolor*{section in head/foot}{bg=myblue, fg=white} %<----- background and font color for the sections in the header
\setbeamercolor*{subsection in head/foot}{bg=myyellow,fg=myblue} %<----- background and font color for the subsections in the header

\colorlet{titleleft}{gray}  %<----- left half of frame title background color
\colorlet{titleright}{gray} %<----- right half of frame title background color
\setbeamercolor*{frametitle}{fg=white} %<---- Color of the frame title text
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



%%%%% Title and Author Information %%%%%
\title[The essential numerical range and the Olsen problem]{The
essential numerical range and the Olsen problem}
\author[{Student} (University of ....)]{Student}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\begin{document}
\section{Introduction}
\section{Positive linear relations}
\section{Lattice linear relations}
\section{Domination by a positive compact relation.}
\subsection{Linear relation}
\subsection{Riesz spaces}
\begin{frame}{Linear relations}

\end{frame}

\end{document}
  • Thank you for your great answer. Please juste could you please write me the necessary codes because I think that some codes can be ommited such that \setbeamercolor{author in head/foot}{bg=blue!30!black} \setbeamercolor{title in head/foot}{bg=yellow!30!white,fg=blue!30!black} \setbeamercolor{page number in head/foot}{bg=blue!30!black,fg=white} – Student Jul 21 at 11:19
  • @Student: Sorry, but there seems to be a misunderstanding originating from the suggestion in my previous answer. Either use \setbeamercolor{author in head/foot}{bg=blue!30!black} OR \colorlet{myblue}{blue!30!black}\setbeamercolor{author in head/foot}{bg=myblue} not both. – leandriis Jul 21 at 11:37
  • The latter is especially useful if you want to use the same blude color for more than one element and maybe later on decide that you would like to use a slightly different shade of blue. In this case, you will only have to change the definition of \colorlet{myblue}{blue!30!black} instead of touching every \setbeamercolor.... – leandriis Jul 21 at 11:37
  • If this is not what you refered to, please add some further explanation especially regarding "the necessary codes". – leandriis Jul 21 at 11:37
  • Thanks a lot. Just I hope to include in this answer the code for my benifit and the benifit of the reader. Thanks a lot. – Student Jul 21 at 11:48
2

To change the foreground and background colors of the beamer frame, you could use the following lines:

\colorlet{titleleft}{gray!80}  %<----- left half of frame title background color
\colorlet{titleright}{gray!60} %<----- right half of frame title background color
\setbeamercolor*{frametitle}{fg=white} %<---- Color of the frame title text

Also for changing left frame header, we have:

\setbeamercolor{palette quaternary}{bg=Blue,fg=red}

It is worth noting that 'fg' and 'bg' means the foreground and background colors, respectively. In summary consider the following sample:

 \documentclass[xcolor=dvipsnames]{beamer}

\usetheme{Madrid}
\useoutertheme{shadow}

\makeatletter
\pgfdeclarehorizontalshading[titleleft,titleright]
{beamer@frametitleshade}
{\paperheight}{%
 color(0pt)=(titleleft);
color(\paperwidth)=(titleright)}
\makeatother

\colorlet{titleleft}{gray!80}
\colorlet{titleright}{gray!60}
\setbeamercolor*{frametitle}{fg=white}
\setbeamercolor{palette quaternary}{bg=Blue,fg=white}

\begin{document}
\section{Introduction}
\section{Positive linear relations}
\begin{frame}{Linear relations}
Example.
\end{frame}
\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.