\usetheme{Boadilla} % Basic footer with title, author(s), date and slide count

% https://www2.warwick.ac.uk/services/externalaffairs/brand/guidelines/elements/colour/
\definecolor{warwick@aubergine}{rgb}{.32,.11,.42}
\definecolor{warwick@grey}{rgb}{.25,.26,.27}
\definecolor{warwick@gold}{rgb}{.78,.63,.10}
\definecolor{warwick@ruby}{rgb}{.71,.08,.23}
\definecolor{warwick@orange}{rgb}{.95,.39,.13}
\definecolor{warwick@brightruby}{rgb}{.94,.25,.31}
\definecolor{warwick@skyblue}{rgb}{.34,.60,.82}

\setbeamercolor{normal text}{fg=warwick@grey,bg=white}
\setbeamercolor{structure}{fg=warwick@aubergine} % Main colour
\setbeamercolor{palette secondary}{fg=white,bg=warwick@aubergine!70!white} % Middle footer
\setbeamercolor{palette primary}{fg=warwick@grey,bg=warwick@aubergine!30!white} % Right footer

\setbeamercolor{background canvas}{parent=normal text}
\setbeamercolor{background}{parent=background canvas}

\setbeamercolor{alerted text}{fg=warwick@brightruby}

\usefonttheme[onlylarge]{structurebold}

\setbeamertemplate{navigation symbols}{} % Remove navigation symbols

\useinnertheme{circles} % round, flat bullet points
\setbeamertemplate{blocks}[default] % rectangular (non-rounded) blocks
\setlength{\parskip}{0pt} % fix oddly tall block titles caused by Rmarkdown

%\titlegraphic{\includegraphics[width=0.25\linewidth]{beamer/warwick.png}}

%% Section headers

\AtBeginSection[]{
  \begin{frame}
  \vfill
  \centering
  \begin{beamercolorbox}[sep=8pt,center,shadow=true,rounded=true]{title}
    \usebeamerfont{title}\insertsectionhead\par%
  \end{beamercolorbox}
  \vfill
  \end{frame}
}