%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\selectcolormodel{rgb}
\mode<presentation>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{pgf}
\usepackage{color}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}

% custom colors
\definecolor{i6blue}{cmyk}{1,0.305,0,0.06}
\definecolor{i6bluedark}{rgb}{0.0156,0.2578,0.5625} 
\definecolor{darkgrey}{HTML}{333333}
\definecolor{darkred}{HTML}{330000}
\definecolor{alertTitleBG}{HTML}{8A2128}
\definecolor{exampleTitleBG}{HTML}{397159}
\definecolor{darkblue}{HTML}{2C5B80}
\definecolor{i6colorscheme1}{HTML}{2E5E84} % head and footlines
\definecolor{i6colorblockbg}{HTML}{2E5E84} % e.g. for block title bg
\definecolor{i6colorblockfg}{HTML}{FFFFFF}
\definecolor{i6colorscheme2}{HTML}{000000}  % e.g. title in headline
\definecolor{i6colorscheme3}{HTML}{FFFFFF}  % e.g. for poster background
\definecolor{i6colorscheme4}{HTML}{000000}
\definecolor{ISTcolorschemeblockBG}{HTML}{FFFFFF}
\definecolor{i6colorschemeHeadline}{HTML}{DBEBF7}  % for header bg
\definecolor{i6colorschemeFootline}{HTML}{FFFFFF}  % for footer bg

% headline colors and fonts
\setbeamercolor{headline}{fg=white,bg=i6colorschemeHeadline}
\setbeamercolor{title in headline}{fg=black}
\setbeamercolor{author in headline}{fg=black}
\setbeamercolor{institute in headline}{fg=black}
\setbeamercolor{logo in headline}{fg=black}
\setbeamercolor{separation line}{bg=i6colorscheme1}

% table and figure captions
\DeclareCaptionFont{caplabel}{\color[HTML]{2C5B80}}
\DeclareCaptionFont{captext}{\color[HTML]{000000}}
\captionsetup{labelfont=caplabel,textfont=captext}


\definecolor{lightgrey}{rgb}{0.96,0.96,0.96} % defining color for listing
\definecolor{darkgreen}{rgb}{0,0.6,0} % defining color for listing
\definecolor{red}{rgb}{0.6,0,0} % defining color for listing

% codeblock
\lstloadlanguages{Ruby}
\lstloadlanguages{Bash}
\lstset{%
  language=Bash,
  basicstyle=\footnotesize\ttfamily\color{black},
  commentstyle = \ttfamily\color{darkgrey},
  keywordstyle=\ttfamily\color{black},
  stringstyle=\color{red},
  backgroundcolor=\color{lightgrey}}

% list bullets, numbers and items
\setbeamercolor{itemize item}{fg=darkblue,bg=white}
\setbeamercolor{item projected}{bg=darkblue}
\setbeamertemplate{enumerate items}[default]
\setbeamercolor{local structure}{fg=darkblue}

% footline colors and fonts
\setbeamercolor{footline}{fg=black,bg=i6colorschemeFootline}
\setbeamerfont{footline}{size=\normalsize}

% body colors and fonts
\setbeamercolor*{normal text}{fg=black,bg=i6colorscheme3}

% block environment
\setbeamercolor*{block body}{bg=ISTcolorschemeblockBG,fg=black}
\setbeamercolor*{block title}{fg=i6colorblockfg,bg=i6colorblockbg}
\setbeamerfont{block title}{size=\large,series=\bf}

% example environment
\setbeamercolor*{example title}{fg=white,bg=i6colorscheme1}
\setbeamercolor*{block title example}{fg=black,bg=i6colorschemeHeadline}
\setbeamerfont{example title}{size=\large,series=\bf}

% alert environment
\setbeamercolor*{block title alerted}{fg=white,bg=alertTitleBG}
\setbeamercolor*{block body alerted}{bg=white,fg=black}
