summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/moloch/beamercolorthememoloch.dtx
blob: d6a14105cadad70d049c23fefae57d5aae585d9c (plain)
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
% \iffalse meta-comment -------------------------------------------------------
% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
% contributors can be found at
%
%     https://github.com/matze/mtheme/graphs/contributors
%
% and the original template was based on the HSRM theme by Benjamin Weiss.
%
% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
% International License (https://creativecommons.org/licenses/by-sa/4.0/).
%% --------------------------------------------------------------------------- 
%% Copyright 2024 Johan Larsson and contributors
% ------------------------------------------------------------------------- \fi
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamercolorthememoloch}[2024-03-06 v0.3.0 Moloch color theme] % x-release-please-version
%</package>
% \fi
% \CheckSum{0}
% \StopEventually{}
% \iffalse
%<*package>
% ------------------------------------------------------------------------- \fi
%
% \subsection{\themename color theme}
%
%
%
% \subsubsection{Package dependencies}
%    \begin{macrocode}
\RequirePackage{pgfopts}
%    \end{macrocode}
%
%
%
% \subsubsection{Options}
%
% \begin{macro}{block}
%    Optionally adds a light grey background to block environments like
%    |theorem| and |example|.
%    \begin{macrocode}
\pgfkeys{
  /moloch/color/block/.cd,
  .is choice,
  transparent/.code=\moloch@block@transparent,
  fill/.code=\moloch@block@fill,
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{colors}
%    Provides the option to have a dark background and light foreground instead
%    of the reverse.
%    \begin{macrocode}
\pgfkeys{
  /moloch/color/background/.cd,
  .is choice,
  dark/.code=\moloch@colors@dark,
  light/.code=\moloch@colors@light,
}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\moloch@color@setdefaults}
%    Sets default values for color theme options.
%    \begin{macrocode}
\newcommand{\moloch@color@setdefaults}{
  \pgfkeys{/moloch/color/.cd,
    background=light,
  }
}
%    \end{macrocode}
% \end{macro}
%
%
%
% \subsubsection{Base colors}
%
%    \begin{macrocode}
\definecolor{mDarkBrown}{HTML}{604c38}
\definecolor{mDarkTeal}{HTML}{23373b}
\definecolor{mLightBrown}{HTML}{EB811B}
\definecolor{mLightGreen}{RGB}{0,128,128}
%    \end{macrocode}
%
%
%
% \subsubsection{Base styles}
%
% All colors in \themename are derived from the definitions of |normal text|,
% |alerted text|, and |example text|.
%
%    \begin{macrocode}
\newcommand{\moloch@colors@dark}{
  \setbeamercolor{normal text}{%
    fg=black!2,
    bg=mDarkTeal
  }
  \usebeamercolor[fg]{normal text}
}
\newcommand{\moloch@colors@light}{
  \setbeamercolor{normal text}{%
    fg=mDarkTeal,
    bg=black!2
  }
}
\setbeamercolor{alerted text}{%
  fg=mLightBrown
}
\setbeamercolor{example text}{%
  fg=mLightGreen
}
%    \end{macrocode}
%
%
%
% \subsubsection{Derived colors}
%
% The titles and structural elements (e.g. |itemize| bullets) are set in the
% same color as |normal text|. This would ideally done by setting |normal text|
% as a parent style, which we do to set |titlelike|, but this doesn't work for
% |structure| as its foreground is set explicitly in
% |beamercolorthemedefault.sty|.
%
%    \begin{macrocode}
\setbeamercolor{titlelike}{use=normal text, parent=normal text}
\setbeamercolor{author}{use=normal text, parent=normal text}
\setbeamercolor{date}{use=normal text, parent=normal text}
\setbeamercolor{institute}{use=normal text, fg=normal text.fg!80!normal text.bg}
\setbeamercolor{structure}{use=normal text, fg=normal text.fg}
%    \end{macrocode}
%
% The “primary” palette should be used for the most important navigational
% elements, and possibly of other elements. \themename uses it for frame
% titles and slides.
%
%    \begin{macrocode}
\setbeamercolor{palette primary}{%
  use=normal text,
  fg=normal text.bg,
  bg=normal text.fg
}
\setbeamercolor{frametitle}{%
  use=palette primary,
  parent=palette primary
}
%    \end{macrocode}
%
% The \themename inner or outer themes optionally display progress
% bars in various locations. Their color is set by |progress bar| but the two
% different kinds can be customized separately. The horizontal rule on the
% title page is also set based on the progress bar color and can be customized
% with |title separator|.
%
%    \begin{macrocode}
\setbeamercolor{progress bar}{%
  use=alerted text,
  fg=alerted text.fg,
  bg=alerted text.fg!50!black!30
}
\setbeamercolor{title separator}{
  use=progress bar,
  parent=progress bar
}
\setbeamercolor{progress bar in head/foot}{%
  use=progress bar,
  parent=progress bar
}
\setbeamercolor{progress bar in section page}{
  use=progress bar,
  parent=progress bar
}
%    \end{macrocode}
%
% Block environments such as |theorem| and |example| have no background color
% by default. The option |block=fill| sets a background color based on the
% background and foreground of |normal text|. The option |block=transparent|
% reverts the block environments to an empty background, which can be useful
% if changing colors mid-presentation.
%
%    \begin{macrocode}
\newcommand{\moloch@block@transparent}{
  \setbeamercolor{block title}{bg=}
  \setbeamercolor{block body}{bg=}
  \setbeamercolor{block title alerted}{bg=}
  \setbeamercolor{block title example}{bg=}
}
\newcommand{\moloch@block@fill}{
  \setbeamercolor{block title}{%
    bg=normal text.bg!80!fg
  }
  \setbeamercolor{block body}{%
    bg=block title.bg!50!normal text.bg
  }
  \setbeamercolor{block title alerted}{%
    bg=block title.bg,
  }
  \setbeamercolor{block title example}{%
    bg=block title.bg,
  }
}
\setbeamercolor{block title}{%
  use=normal text,
  fg=normal text.fg
}
\setbeamercolor{block title alerted}{%
  use={block title, alerted text},
  fg=alerted text.fg
}
\setbeamercolor{block title example}{%
  use={block title, example text},
  fg=example text.fg
}
\setbeamercolor{block body alerted}{use=block body, parent=block body}
\setbeamercolor{block body example}{use=block body, parent=block body}
%    \end{macrocode}
%
% Footnotes
%
%    \begin{macrocode}
\setbeamercolor{footnote}{fg=normal text.fg!90}
\setbeamercolor{footnote mark}{fg=.}
%    \end{macrocode}
%
%
% Footnotes
%
%    \begin{macrocode}
\setbeamercolor{footnote}{fg=normal text.fg!90}
\setbeamercolor{footnote mark}{fg=.}
%    \end{macrocode}
%
% We also reset the bibliography colors in order to pick up the surrounding
% colors at the time of use. This prevents us having to set the correct color in
% normal and standout mode.
%
%    \begin{macrocode}
\setbeamercolor{bibliography entry author}{fg=, bg=}
\setbeamercolor{bibliography entry title}{fg=, bg=}
\setbeamercolor{bibliography entry location}{fg=, bg=}
\setbeamercolor{bibliography entry note}{fg=, bg=}
%    \end{macrocode}
%
%
%
% \subsubsection{Process package options}
%
%    \begin{macrocode}
\moloch@color@setdefaults
\ProcessPgfPackageOptions{/moloch/color}
%    \end{macrocode}
%
%    \begin{macrocode}
\mode<all>
%    \end{macrocode}
%
% \iffalse
%</package>
% \fi
% \Finale
\endinput