-
Notifications
You must be signed in to change notification settings - Fork 25
/
beamercolorthemeucl.sty
67 lines (55 loc) · 2.38 KB
/
beamercolorthemeucl.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
%\mode<presentation>
\RequirePackage{uclcolors}
\RequirePackage{etoolbox}
% Determines the UCL colour name of the template in the 1st argument, and
% stores it in the 2nd argument. This is used to determine which banner image
% should be included
%
% Should probably change to raise a \@latex@error if non-UCL colour is used,
% but currently will just leave black
\newcommand\uclcolorname[2]{%
\extractcolorspec{#1}{\ucl@colorspec@current}%
\forcsvlist{\ucl@colorcheck{#2}}{black,white,darkpurple,darkred,darkblue,%
darkgreen,darkbrown,richred,midred,navyblue,midgreen,darkgrey,pink,%
orange,brightblue,brightgreen,lightgrey,lightpurple,yellow,lightblue,%
lightgreen,stone}%
}
% a utility function called by \uclcolorname
\newcommand\ucl@colorcheck[2]{%
\extractcolorspec{#2}{\ucl@colorspec@check}%
\ifdefequal{\ucl@colorspec@check}{\ucl@colorspec@current}{\gdef#1{#2}}{}%
}
% this is the main variable to customise
\setbeamercolor{banner}{bg=black,fg=white}
% title on title page
\setbeamercolor{title}{parent=banner}
% used for structural elements
\setbeamercolor{structure}{use=banner,fg=banner.bg}
\setbeamercolor{frametitle}{fg=black}
% used for \alert
\setbeamercolor{alerted text}{fg=richred}
% used in the example environment
\setbeamercolor{example text}{fg=darkgreen}
\setbeamercolor{block title}{parent=banner}
%%% can use the following for a striped
% \setbeamercolor{block title}{parent=banner stripe}
\setbeamercolor{block body}{use=block title,bg=block title.bg!30, fg=black}
\setbeamercolor{block title alerted}{use=alerted text,%
bg=alerted text.fg,fg=white}
\setbeamercolor{block body alerted}{use=block title alerted,%
bg=block title alerted.bg!30,fg=black}
\setbeamercolor{block title example}{use=example text,%
bg=example text.fg,fg=white}
\setbeamercolor{block body example}{use=block title example,%
bg=block title example.bg!30,fg=black}
% used for section and miniframes headline templates
\setbeamercolor*{section in head/foot}{use=banner,%
fg=banner.fg!70!banner.bg,bg=banner.fg!20!banner.bg}
\setbeamercolor*{subsection in head/foot}{use=banner,%
fg=banner.fg!50!banner.bg,bg=banner.fg!20!banner.bg}
% used for footline template
\setbeamercolor*{footline}{parent={banner,banner stripe}}
\setbeamercolor*{author in head/foot}{parent=footline}
\setbeamercolor*{title in head/foot}{parent=footline}
\setbeamercolor*{date in head/foot}{parent=footline}
%\mode<all>