%% This is file `beamercolorthemeTUDa.sty' version 3.16 (2021/06/03),
%% it is part of
%% TUDa-CI -- Corporate Design for TU Darmstadt
%% ----------------------------------------------------------------------------
%%
%%  Copyright (C) 2018--2021 by Marei Peischl <marei@peitex.de>
%%
%% ============================================================================
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2008/05/04 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
%%
%% The Current Maintainers of this work are
%%   Marei Peischl <tuda-ci@peitex.de>
%%   Markus Lazanowski <latex@ce.tu-darmstadt.de>
%%
%% The development respository can be found at
%% https://github.com/tudace/tuda_latex_templates
%% Please use the issue tracker for feedback!
%%
%% ============================================================================
%%
\def\fileversion{3.16}
\def\filedate{2021/06/03}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamercolorthemeTUDa}
[\filedate\space\fileversion]

\RequirePackage{l3keys2e}
\ExplSyntaxOn
\bool_if_exist:NF \g__ptxcd_colorframetitle_bool {\bool_new:N \g__ptxcd_colorframetitle_bool}

\keys_define:nn {ptxcd/beamer/color} {
	colortitle .bool_gset:N = \g_ptxcd_beamer_colortitle_bool,
	colortitle .default:n = true,
	colortitle .initial:n = true,
	colorbacktitle .meta:n = {colortitle=#1},
	colorframetitle .code:n = \use:c {bool_gset_#1:N} \g__ptxcd_colorframetitle_bool \cs_if_exist_use:N  \__ptxcd_setup_frametitle_color:,
	colorframetitle .default:n = true,
	colorback .meta:n = {colorframetitle=#1}
}

\ProcessKeysOptions{ptxcd/beamer/color}

\ExplSyntaxOff
\RequirePackage[RGB]{tudacolors}

\mode<presentation>

\setbeamercolor*{smallrule}{bg=black}
\setbeamercolor*{identbar}{bg=identbarcolor}

\ExplSyntaxOn
\bool_if:NTF \g_ptxcd_beamer_colortitle_bool {
	\setbeamercolor*{title}{fg=textonaccentcolor,bg=accentcolor}
}{
	\setbeamercolor*{title}{parent=normal~text}
}


\cs_new:Nn \__ptxcd_setup_frametitle_color: {
	\bool_if:NTF \g__ptxcd_colorframetitle_bool {
		\setbeamercolor*{frametitle}{fg=textonaccentcolor,bg=accentcolor}
	} {
		\setbeamercolor*{frametitle}{use=normal~text,fg=normal~text.fg,bg=}
	}
}

\__ptxcd_setup_frametitle_color:

\ExplSyntaxOff

\setbeamercolor*{author}{parent=title}
\setbeamercolor*{institute}{parent=title}

\setbeamercolor*{normal text}{bg=,fg=black}
\setbeamercolor*{background canvas}{parent=normal text}
\setbeamercolor*{section in toc}{parent=normal text}
\setbeamercolor*{footline}{parent=normal text}

\setbeamercolor*{alerted text}{fg=textaccentcolor}
\setbeamercolor*{structure}{fg=textaccentcolor}

\setbeamercolor{bibliography item}{parent=item}
\setbeamercolor{bibliography entry author}{use=structure,fg=structure.fg}
\setbeamercolor{bibliography entry title}{use=normal text,fg=normal text.fg}
\setbeamercolor{bibliography entry location}{use=structure,fg=structure.fg}
\setbeamercolor{bibliography entry note}{use=structure,fg=normal text.fg}

\setbeamercolor{titlelike}{fg=textaccentcolor,bg=white}

\setbeamercolor*{block title}{fg=textonaccentcolor,bg=accentcolor}
\setbeamercolor*{block body}{fg=black,bg=black!15}

\setbeamercolor*{block title alerted}{fg=TUDa-9b,bg=black!15}
\setbeamercolor*{block body alerted}{use=normal text, bg=white}
\setbeamercolor*{block frame alerted}{bg=TUDa-9b}

\setbeamercolor*{block title example}{fg=TUDa-4d,bg=black!15}
\setbeamercolor*{block body example}{use=normal text, bg=white}
\setbeamercolor*{block frame example}{bg=TUDa-4d}


\mode
<all>

\endinput
