| 1 |
% \iffalse meta-comment ------------------------------------------------------- |
| 2 |
% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of |
| 3 |
% contributors can be found at |
| 4 |
% |
| 5 |
% https://github.com/matze/mtheme/graphs/contributors |
| 6 |
% |
| 7 |
% and the original template was based on the HSRM theme by Benjamin Weiss. |
| 8 |
% |
| 9 |
% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 |
| 10 |
% International License (https://creativecommons.org/licenses/by-sa/4.0/). |
| 11 |
%% --------------------------------------------------------------------------- |
| 12 |
%% Copyright 2024 Johan Larsson and contributors |
| 13 |
% ------------------------------------------------------------------------- \fi |
| 14 |
% \iffalse |
| 15 |
%<*package> |
| 16 |
\NeedsTeXFormat{LaTeX2e} |
| 17 |
\ProvidesPackage{beamercolorthememoloch}[2025-12-18 v2.1.0 Moloch color theme] |
| 18 |
%</package> |
| 19 |
% \fi |
| 20 |
% \CheckSum{0} |
| 21 |
% \StopEventually{} |
| 22 |
% \iffalse |
| 23 |
%<*package> |
| 24 |
% ------------------------------------------------------------------------- \fi |
| 25 |
% |
| 26 |
% \subsection{Moloch Color Theme} |
| 27 |
% |
| 28 |
% |
| 29 |
% |
| 30 |
% \subsubsection{Package Dependencies} |
| 31 |
% \begin{macrocode} |
| 32 |
\RequirePackage{pgfopts} |
| 33 |
% \end{macrocode} |
| 34 |
% |
| 35 |
% |
| 36 |
% |
| 37 |
% \subsubsection{Options} |
| 38 |
% |
| 39 |
% \begin{macro}{block} |
| 40 |
% Optionally adds a light grey background to block environments like |
| 41 |
% \verb|theorem| and \verb|example|. |
| 42 |
% \begin{macrocode} |
| 43 |
\pgfkeys{ |
| 44 |
/moloch/color/block/.cd, |
| 45 |
.is choice, |
| 46 |
transparent/.code=\moloch@block@transparent, |
| 47 |
fill/.code=\moloch@block@fill, |
| 48 |
} |
| 49 |
% \end{macrocode} |
| 50 |
% \end{macro} |
| 51 |
% |
| 52 |
% \begin{macro}{Variant tracking} |
| 53 |
% Boolean to track whether we're in dark or light variant. |
| 54 |
% \begin{macrocode} |
| 55 |
\newif\ifmoloch@variant@dark |
| 56 |
\moloch@variant@darkfalse % Default to light variant |
| 57 |
% \end{macrocode} |
| 58 |
% \end{macro} |
| 59 |
% |
| 60 |
% \begin{macro}{colors} |
| 61 |
% Provides the option to have a dark background and light foreground instead |
| 62 |
% of the reverse. |
| 63 |
% \begin{macrocode} |
| 64 |
\pgfkeys{ |
| 65 |
/moloch/color/background/.cd, |
| 66 |
.is choice, |
| 67 |
dark/.code={% |
| 68 |
\PackageWarning{beamercolorthememoloch}{% |
| 69 |
Option 'background' is deprecated.\MessageBreak |
| 70 |
Use 'colortheme variant=light/dark' instead |
| 71 |
}% |
| 72 |
\moloch@colors@dark |
| 73 |
}, |
| 74 |
light/.code={% |
| 75 |
\moloch@colors@light |
| 76 |
}, |
| 77 |
} |
| 78 |
% \end{macrocode} |
| 79 |
% \end{macro} |
| 80 |
% |
| 81 |
% \begin{macro}{\moloch@color@setdefaults} |
| 82 |
% Sets default values for color theme options. |
| 83 |
% \begin{macrocode} |
| 84 |
\newcommand{\moloch@color@setdefaults}{ |
| 85 |
\pgfkeys{/moloch/color/.cd, |
| 86 |
background=light, |
| 87 |
} |
| 88 |
} |
| 89 |
% \end{macrocode} |
| 90 |
% \end{macro} |
| 91 |
% |
| 92 |
% \subsubsection{Base Colors} |
| 93 |
% |
| 94 |
% These are the base colors used in the default Moloch color theme. |
| 95 |
% They are kept here mostly for backwards compatibility, and colors |
| 96 |
% for the themes are now defined in the preset commands below. |
| 97 |
% |
| 98 |
% \begin{macrocode} |
| 99 |
\definecolor{mDarkBrown}{HTML}{604c38} |
| 100 |
\definecolor{mDarkTeal}{HTML}{23373b} |
| 101 |
\definecolor{mLightBrown}{HTML}{EB811B} |
| 102 |
\definecolor{mLightGreen}{RGB}{0,128,128} |
| 103 |
% \end{macrocode} |
| 104 |
% |
| 105 |
% \subsubsection{Hooks for Color Themes} |
| 106 |
% |
| 107 |
% Moloch color themes can register light and dark color schemes using the |
| 108 |
% commands below. The registered colors will be stored in the macros |
| 109 |
% \verb|\moloch@define@light@colors| and \verb|\moloch@define@dark@colors| respectively. |
| 110 |
% These macros are invoked when the \verb|variant=light| or \verb|variant=dark| |
| 111 |
% options are selected, allowing theme presets to define complete color schemes |
| 112 |
% for both variants. |
| 113 |
% |
| 114 |
% \begin{macro}{\moloch@define@light@colors} |
| 115 |
% \begin{macro}{\moloch@define@dark@colors} |
| 116 |
% Storage macros for the light and dark color definitions. Initialized |
| 117 |
% empty and filled by color theme presets via the registration commands. |
| 118 |
% \begin{macrocode} |
| 119 |
\newcommand{\moloch@define@light@colors}{} |
| 120 |
\newcommand{\moloch@define@dark@colors}{} |
| 121 |
% \end{macrocode} |
| 122 |
% \end{macro} |
| 123 |
% \end{macro} |
| 124 |
% |
| 125 |
% \begin{macro}{\moloch@register@light@colors} |
| 126 |
% Allows color theme presets to register their light variant color scheme. |
| 127 |
% The argument should contain \verb|\setbeamercolor| commands that define |
| 128 |
% all necessary colors for the light variant. |
| 129 |
% \begin{macrocode} |
| 130 |
\newcommand{\moloch@register@light@colors}[1]{% |
| 131 |
\renewcommand{\moloch@define@light@colors}{#1}% |
| 132 |
} |
| 133 |
% \end{macrocode} |
| 134 |
% \end{macro} |
| 135 |
% |
| 136 |
% \begin{macro}{\moloch@register@dark@colors} |
| 137 |
% Allows color theme presets to register their dark variant color scheme. |
| 138 |
% The argument should contain \verb|\setbeamercolor| commands that define |
| 139 |
% all necessary colors for the dark variant. |
| 140 |
% \begin{macrocode} |
| 141 |
\newcommand{\moloch@register@dark@colors}[1]{% |
| 142 |
\renewcommand{\moloch@define@dark@colors}{#1}% |
| 143 |
} |
| 144 |
% \end{macrocode} |
| 145 |
% \end{macro} |
| 146 |
% |
| 147 |
% \begin{macro}{\moloch@setup@block@colors} |
| 148 |
% Configures the colors for block environments to derive from normal text |
| 149 |
% and alerted/example text colors. This is called after switching variants |
| 150 |
% to ensure block colors stay consistent with the current color scheme. |
| 151 |
% Block titles inherit from normal text foreground, while alerted and |
| 152 |
% example block titles additionally use their respective text colors. |
| 153 |
% \begin{macrocode} |
| 154 |
\newcommand{\moloch@setup@block@colors}{% |
| 155 |
\setbeamercolor{block title}{% |
| 156 |
use=normal text, |
| 157 |
fg=normal text.fg, |
| 158 |
bg= |
| 159 |
}% |
| 160 |
\setbeamercolor{block title alerted}{% |
| 161 |
use={block title, alerted text} |
| 162 |
}% |
| 163 |
\setbeamercolor{block title example}{% |
| 164 |
use={block title, example text} |
| 165 |
}% |
| 166 |
\setbeamercolor{block body alerted}{use=block body, parent=block body}% |
| 167 |
\setbeamercolor{block body example}{use=block body, parent=block body}% |
| 168 |
} |
| 169 |
% \end{macrocode} |
| 170 |
% \end{macro} |
| 171 |
% |
| 172 |
% \begin{macro}{\moloch@setup@text@colors} |
| 173 |
% Configures title-related colors to derive from normal text. This ensures |
| 174 |
% that when normal text color changes (e.g., during variant switching), |
| 175 |
% all title elements automatically adapt. Institute and thanks use a |
| 176 |
% slightly muted version (80\% mix) for visual hierarchy. |
| 177 |
% \begin{macrocode} |
| 178 |
\newcommand{\moloch@setup@text@colors}{% |
| 179 |
\setbeamercolor{titlelike}{use=normal text, parent=normal text}% |
| 180 |
\setbeamercolor{author}{use=normal text, parent=normal text}% |
| 181 |
\setbeamercolor{date}{use=normal text, parent=normal text}% |
| 182 |
\setbeamercolor{institute}{% |
| 183 |
use=normal text, fg=normal text.fg!80!normal text.bg}% |
| 184 |
\setbeamercolor{structure}{use=normal text, fg=normal text.fg}% |
| 185 |
\setbeamercolor{thanks}{% |
| 186 |
use=normal text,fg=normal text.fg!80!normal text.bg}% |
| 187 |
} |
| 188 |
% \end{macrocode} |
| 189 |
% \end{macro} |
| 190 |
% |
| 191 |
% \begin{macro}{\moloch@setup@progressbar@parents} |
| 192 |
% Updates colors that derive from the progress bar color. This includes |
| 193 |
% the title separator (horizontal rule on title page) and progress bars |
| 194 |
% in various locations (head, foot, section pages). Called whenever the |
| 195 |
% progress bar foreground or background color is customized. |
| 196 |
% \begin{macrocode} |
| 197 |
\newcommand{\moloch@setup@progressbar@parents}{% |
| 198 |
\setbeamercolor{progress bar in head/foot}{% |
| 199 |
use=progress bar, |
| 200 |
parent=progress bar |
| 201 |
}% |
| 202 |
\setbeamercolor{progress bar in section page}{% |
| 203 |
use=progress bar, |
| 204 |
parent=progress bar |
| 205 |
}% |
| 206 |
} |
| 207 |
% \end{macrocode} |
| 208 |
% \end{macro} |
| 209 |
% |
| 210 |
% \subsubsection{Variant Switching Commands} |
| 211 |
% |
| 212 |
% \begin{macro}{\moloch@colors@dark} |
| 213 |
% Switches to the dark variant color scheme. This command: |
| 214 |
% \begin{enumerate} |
| 215 |
% \item Sets the dark variant flag |
| 216 |
% \item Applies the registered dark colors from the current theme preset |
| 217 |
% \item Ensures normal text color is active |
| 218 |
% \item Updates dependent colors (blocks, text) to match |
| 219 |
% \item Applies any stored user customizations for the dark variant |
| 220 |
% \end{enumerate} |
| 221 |
% \begin{macrocode} |
| 222 |
\newcommand{\moloch@colors@dark}{ |
| 223 |
\moloch@variant@darktrue |
| 224 |
\moloch@define@dark@colors |
| 225 |
\usebeamercolor[fg]{normal text} |
| 226 |
|
| 227 |
\moloch@setup@block@colors |
| 228 |
\moloch@setup@text@colors |
| 229 |
|
| 230 |
% Apply stored dark variant colors |
| 231 |
\moloch@apply@store@dark@colors |
| 232 |
} |
| 233 |
% \end{macrocode} |
| 234 |
% \end{macro} |
| 235 |
% |
| 236 |
% \begin{macro}{\moloch@colors@light} |
| 237 |
% Switches to the light variant color scheme. Mirrors the dark variant |
| 238 |
% command but applies light colors instead. The sequence ensures that |
| 239 |
% user customizations override theme defaults. |
| 240 |
% \begin{macrocode} |
| 241 |
\newcommand{\moloch@colors@light}{ |
| 242 |
\moloch@variant@darkfalse |
| 243 |
\moloch@define@light@colors |
| 244 |
\usebeamercolor[fg]{normal text} |
| 245 |
|
| 246 |
\moloch@setup@block@colors |
| 247 |
\moloch@setup@text@colors |
| 248 |
|
| 249 |
\setbeamercolor{title separator}{ |
| 250 |
use=progress bar, |
| 251 |
parent=progress bar |
| 252 |
} |
| 253 |
\moloch@setup@progressbar@parents |
| 254 |
|
| 255 |
% Apply stored light variant colors AFTER block definitions |
| 256 |
\moloch@apply@store@light@colors |
| 257 |
} |
| 258 |
% \end{macrocode} |
| 259 |
% \end{macro} |
| 260 |
% |
| 261 |
% \begin{macro}{\moloch@apply@current@variant} |
| 262 |
% Helper command that applies the appropriate variant based on the |
| 263 |
% \verb|\ifmoloch@variant@dark| boolean flag. Used during initialization |
| 264 |
% and when switching color theme presets to ensure the correct variant |
| 265 |
% is applied. |
| 266 |
% \begin{macrocode} |
| 267 |
\newcommand{\moloch@apply@current@variant}{% |
| 268 |
\ifmoloch@variant@dark |
| 269 |
\moloch@colors@dark |
| 270 |
\else |
| 271 |
\moloch@colors@light |
| 272 |
\fi |
| 273 |
} |
| 274 |
% \end{macrocode} |
| 275 |
% \end{macro} |
| 276 |
% |
| 277 |
% \subsubsection{Color Customization Storage System} |
| 278 |
% |
| 279 |
% The storage system allows users to customize individual colors while |
| 280 |
% preserving those customizations across variant switches. Each color option |
| 281 |
% has separate storage for light and dark variants. When a user sets a color, |
| 282 |
% it's both applied immediately and stored. When switching variants, stored |
| 283 |
% customizations are reapplied on top of the theme defaults. |
| 284 |
% |
| 285 |
% \begin{macro}{\moloch@apply@store@light@colors} |
| 286 |
% Applies stored user customizations for the light variant. Checks each |
| 287 |
% storage macro and applies it if non-empty. This is called after applying |
| 288 |
% the theme's light colors to override with user preferences. For colors |
| 289 |
% that affect multiple elements (like \texttt{alerted text} affecting both |
| 290 |
% inline text and block titles), both are updated. Setup functions are |
| 291 |
% called when needed to propagate changes to dependent colors. |
| 292 |
% \begin{macrocode} |
| 293 |
\newcommand{\moloch@apply@store@light@colors}{% |
| 294 |
\ifx\moloch@store@light@alerted@text\empty\else |
| 295 |
\setbeamercolor{alerted text}{fg=\moloch@store@light@alerted@text}% |
| 296 |
\setbeamercolor{block title alerted}{fg=\moloch@store@light@alerted@text}% |
| 297 |
\fi |
| 298 |
\ifx\moloch@store@light@example@text\empty\else |
| 299 |
\setbeamercolor{example text}{fg=\moloch@store@light@example@text}% |
| 300 |
\setbeamercolor{block title example}{fg=\moloch@store@light@example@text}% |
| 301 |
\fi |
| 302 |
\ifx\moloch@store@light@frametitle@fg\empty\else |
| 303 |
\setbeamercolor{frametitle}{fg=\moloch@store@light@frametitle@fg}% |
| 304 |
\fi |
| 305 |
\ifx\moloch@store@light@frametitle@bg\empty\else |
| 306 |
\setbeamercolor{frametitle}{bg=\moloch@store@light@frametitle@bg}% |
| 307 |
\fi |
| 308 |
\ifx\moloch@store@light@progressbar@fg\empty\else |
| 309 |
\setbeamercolor{progress bar}{fg=\moloch@store@light@progressbar@fg}% |
| 310 |
\moloch@setup@progressbar@parents |
| 311 |
\fi |
| 312 |
\ifx\moloch@store@light@progressbar@bg\empty\else |
| 313 |
\setbeamercolor{progress bar}{bg=\moloch@store@light@progressbar@bg}% |
| 314 |
\moloch@setup@progressbar@parents |
| 315 |
\fi |
| 316 |
\ifx\moloch@store@light@standout@fg\empty\else |
| 317 |
\setbeamercolor{standout}{fg=\moloch@store@light@standout@fg}% |
| 318 |
\fi |
| 319 |
\ifx\moloch@store@light@standout@bg\empty\else |
| 320 |
\setbeamercolor{standout}{bg=\moloch@store@light@standout@bg}% |
| 321 |
\fi |
| 322 |
\ifx\moloch@store@light@normal@text@fg\empty\else |
| 323 |
\setbeamercolor{normal text}{fg=\moloch@store@light@normal@text@fg}% |
| 324 |
\moloch@setup@text@colors |
| 325 |
\moloch@setup@block@colors |
| 326 |
\fi |
| 327 |
\ifx\moloch@store@light@normal@text@bg\empty\else |
| 328 |
\setbeamercolor{normal text}{bg=\moloch@store@light@normal@text@bg}% |
| 329 |
\fi |
| 330 |
\ifx\moloch@store@light@title@separator\empty\else |
| 331 |
\setbeamercolor{title separator}{fg=\moloch@store@light@title@separator}% |
| 332 |
\fi |
| 333 |
} |
| 334 |
% \end{macrocode} |
| 335 |
% \end{macro} |
| 336 |
% |
| 337 |
% \begin{macro}{\moloch@apply@store@dark@colors} |
| 338 |
% Applies stored user customizations for the dark variant. Mirrors the |
| 339 |
% light variant application but for dark colors. The logic is identical: |
| 340 |
% check each storage macro, apply if non-empty, and call setup functions |
| 341 |
% for colors that affect dependent elements. |
| 342 |
% \begin{macrocode} |
| 343 |
\newcommand{\moloch@apply@store@dark@colors}{% |
| 344 |
\ifx\moloch@store@dark@alerted@text\empty\else |
| 345 |
\setbeamercolor{alerted text}{fg=\moloch@store@dark@alerted@text}% |
| 346 |
\setbeamercolor{block title alerted}{fg=\moloch@store@dark@alerted@text}% |
| 347 |
\fi |
| 348 |
\ifx\moloch@store@dark@example@text\empty\else |
| 349 |
\setbeamercolor{example text}{fg=\moloch@store@dark@example@text}% |
| 350 |
\setbeamercolor{block title example}{fg=\moloch@store@dark@example@text}% |
| 351 |
\fi |
| 352 |
\ifx\moloch@store@dark@frametitle@fg\empty\else |
| 353 |
\setbeamercolor{frametitle}{fg=\moloch@store@dark@frametitle@fg}% |
| 354 |
\fi |
| 355 |
\ifx\moloch@store@dark@frametitle@bg\empty\else |
| 356 |
\setbeamercolor{frametitle}{bg=\moloch@store@dark@frametitle@bg}% |
| 357 |
\fi |
| 358 |
\ifx\moloch@store@dark@progressbar@fg\empty\else |
| 359 |
\setbeamercolor{progress bar}{fg=\moloch@store@dark@progressbar@fg}% |
| 360 |
\moloch@setup@progressbar@parents |
| 361 |
\fi |
| 362 |
\ifx\moloch@store@dark@progressbar@bg\empty\else |
| 363 |
\setbeamercolor{progress bar}{bg=\moloch@store@dark@progressbar@bg}% |
| 364 |
\moloch@setup@progressbar@parents |
| 365 |
\fi |
| 366 |
\ifx\moloch@store@dark@standout@fg\empty\else |
| 367 |
\setbeamercolor{standout}{fg=\moloch@store@dark@standout@fg}% |
| 368 |
\fi |
| 369 |
\ifx\moloch@store@dark@standout@bg\empty\else |
| 370 |
\setbeamercolor{standout}{bg=\moloch@store@dark@standout@bg}% |
| 371 |
\fi |
| 372 |
\ifx\moloch@store@dark@normal@text@fg\empty\else |
| 373 |
\setbeamercolor{normal text}{fg=\moloch@store@dark@normal@text@fg}% |
| 374 |
\moloch@setup@text@colors |
| 375 |
\moloch@setup@block@colors |
| 376 |
\fi |
| 377 |
\ifx\moloch@store@dark@normal@text@bg\empty\else |
| 378 |
\setbeamercolor{normal text}{bg=\moloch@store@dark@normal@text@bg}% |
| 379 |
\fi |
| 380 |
\ifx\moloch@store@dark@title@separator\empty\else |
| 381 |
\setbeamercolor{title separator}{fg=\moloch@store@dark@title@separator}% |
| 382 |
\fi |
| 383 |
} |
| 384 |
% \end{macrocode} |
| 385 |
% \end{macro} |
| 386 |
% |
| 387 |
% |
| 388 |
% |
| 389 |
% \subsubsection{Semantic Color Helper} |
| 390 |
% |
| 391 |
% \begin{macro}{\moloch@apply@semantic@colors} |
| 392 |
% Maps semantic color names to Beamer color definitions. This helper expects |
| 393 |
% the following colors to be defined (via \verb|\definecolor| or \verb|\colorlet|) |
| 394 |
% before being called: |
| 395 |
% |
| 396 |
% \begin{itemize} |
| 397 |
% \item \texttt{mNormaltextFg} - Normal text foreground |
| 398 |
% \item \texttt{mNormaltextBg} - Normal text background |
| 399 |
% \item \texttt{mFrametitleFg} - Frame title foreground |
| 400 |
% \item \texttt{mFrametitleBg} - Frame title background |
| 401 |
% \item \texttt{mAlertFg} - Alerted text foreground |
| 402 |
% \item \texttt{mExampleFg} - Example text foreground |
| 403 |
% \item \texttt{mProgressbarFg} - Progress bar foreground |
| 404 |
% \item \texttt{mProgressbarBg} - Progress bar background |
| 405 |
% \item \texttt{mStandoutFg} - Standout frame foreground |
| 406 |
% \item \texttt{mStandoutBg} - Standout frame background |
| 407 |
% \item \texttt{mFootnoteFg} - Footnote foreground |
| 408 |
% \end{itemize} |
| 409 |
% |
| 410 |
% Color themes should define all these colors (using any color specification |
| 411 |
% method: HTML, RGB, color names, or color expressions), then call this |
| 412 |
% helper to apply them to the appropriate Beamer color elements. |
| 413 |
% \begin{macrocode} |
| 414 |
\newcommand{\moloch@apply@semantic@colors}{% |
| 415 |
% Apply semantic colors to Beamer color definitions |
| 416 |
\setbeamercolor{normal text}{fg=mNormaltextFg, bg=mNormaltextBg}% |
| 417 |
\setbeamercolor{frametitle}{fg=mFrametitleFg, bg=mFrametitleBg}% |
| 418 |
\setbeamercolor{palette primary}{use=frametitle, parent=frametitle}% |
| 419 |
\setbeamercolor{alerted text}{fg=mAlertFg}% |
| 420 |
\setbeamercolor{example text}{fg=mExampleFg}% |
| 421 |
\setbeamercolor{progress bar}{fg=mProgressbarFg, bg=mProgressbarBg}% |
| 422 |
\setbeamercolor{title separator}{fg=mTitleseparatorFg}% |
| 423 |
\setbeamercolor{footnote}{fg=mFootnoteFg}% |
| 424 |
\setbeamercolor{footnote mark}{fg=.}% |
| 425 |
\setbeamercolor{standout}{fg=mStandoutFg, bg=mStandoutBg}% |
| 426 |
} |
| 427 |
% \end{macrocode} |
| 428 |
% \end{macro} |
| 429 |
% |
| 430 |
% \subsubsection{Color Theme Presets} |
| 431 |
% |
| 432 |
% These commands define complete color schemes that can be switched between. |
| 433 |
% Each preset registers both light and dark variants. |
| 434 |
% |
| 435 |
% \begin{macro}{\moloch@colortheme@default} |
| 436 |
% The default moloch color scheme. |
| 437 |
% \begin{macrocode} |
| 438 |
\newcommand{\moloch@colortheme@default}{% |
| 439 |
\moloch@register@light@colors{% |
| 440 |
\definecolor{mNormaltextFg}{HTML}{23373b} |
| 441 |
\colorlet{mNormaltextBg}{black!2} |
| 442 |
\definecolor{mAlertFg}{HTML}{EB811B} |
| 443 |
\definecolor{mExampleFg}{RGB}{0,128,128} |
| 444 |
\colorlet{mFrametitleFg}{mNormaltextBg} |
| 445 |
\colorlet{mFrametitleBg}{mNormaltextFg} |
| 446 |
\colorlet{mProgressbarFg}{mAlertFg} |
| 447 |
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30} |
| 448 |
\colorlet{mTitleseparatorFg}{mProgressbarFg} |
| 449 |
\colorlet{mStandoutFg}{mNormaltextBg} |
| 450 |
\colorlet{mStandoutBg}{mNormaltextFg} |
| 451 |
\colorlet{mFootnoteFg}{mNormaltextFg!90} |
| 452 |
|
| 453 |
\moloch@apply@semantic@colors |
| 454 |
}% |
| 455 |
|
| 456 |
% Register dark variant - use brighter colors for better contrast |
| 457 |
\moloch@register@dark@colors{% |
| 458 |
\colorlet{mNormaltextFg}{black!2} |
| 459 |
\definecolor{mNormaltextBg}{HTML}{23373b} |
| 460 |
\definecolor{mAlertFg}{HTML}{EF9F76} |
| 461 |
\definecolor{mExampleFg}{HTML}{5ABFB5} |
| 462 |
\colorlet{mFrametitleFg}{mNormaltextBg} |
| 463 |
\colorlet{mFrametitleBg}{black!15} |
| 464 |
\colorlet{mProgressbarFg}{mAlertFg} |
| 465 |
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30} |
| 466 |
\colorlet{mTitleseparatorFg}{mProgressbarFg} |
| 467 |
\colorlet{mStandoutFg}{mNormaltextBg} |
| 468 |
\colorlet{mStandoutBg}{black!15} |
| 469 |
\colorlet{mFootnoteFg}{mNormaltextFg!90} |
| 470 |
|
| 471 |
\moloch@apply@semantic@colors |
| 472 |
}% |
| 473 |
|
| 474 |
% Apply current variant after registering both |
| 475 |
\moloch@apply@current@variant |
| 476 |
} |
| 477 |
% \end{macrocode} |
| 478 |
% \end{macro} |
| 479 |
% |
| 480 |
% \begin{macro}{\moloch@colortheme@tomorrow} |
| 481 |
% The Tomorrow color scheme by Chris Kempson. |
| 482 |
% \begin{macrocode} |
| 483 |
\newcommand{\moloch@colortheme@tomorrow}{% |
| 484 |
\moloch@register@light@colors{% |
| 485 |
\definecolor{mNormaltextFg}{HTML}{1d1f21} |
| 486 |
\colorlet{mNormaltextBg}{white} |
| 487 |
\definecolor{mAlertFg}{HTML}{cc6666} |
| 488 |
\definecolor{mExampleFg}{HTML}{4271ae} |
| 489 |
\colorlet{mFrametitleFg}{white} |
| 490 |
\definecolor{mFrametitleBg}{HTML}{1d1f21} |
| 491 |
\definecolor{mProgressbarFg}{HTML}{8959a8} |
| 492 |
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30} |
| 493 |
\definecolor{mTitleseparatorFg}{HTML}{8959a8} |
| 494 |
\colorlet{mStandoutFg}{white} |
| 495 |
\definecolor{mStandoutBg}{HTML}{1d1f21} |
| 496 |
\definecolor{mFootnoteFg}{HTML}{1d1f21} |
| 497 |
|
| 498 |
\moloch@apply@semantic@colors |
| 499 |
} |
| 500 |
|
| 501 |
\moloch@register@dark@colors{% |
| 502 |
\colorlet{mNormaltextFg}{white} |
| 503 |
\definecolor{mNormaltextBg}{HTML}{282a2e} |
| 504 |
\definecolor{mAlertFg}{HTML}{de935f} |
| 505 |
\definecolor{mExampleFg}{HTML}{7aa6da} |
| 506 |
\colorlet{mFrametitleFg}{white} |
| 507 |
\definecolor{mFrametitleBg}{HTML}{1d1f21} |
| 508 |
\definecolor{mProgressbarFg}{HTML}{b294bb} |
| 509 |
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30} |
| 510 |
\definecolor{mTitleseparatorFg}{HTML}{b294bb} |
| 511 |
\colorlet{mStandoutFg}{white} |
| 512 |
\definecolor{mStandoutBg}{HTML}{1d1f21} |
| 513 |
\definecolor{mFootnoteFg}{HTML}{1d1f21} |
| 514 |
|
| 515 |
\moloch@apply@semantic@colors |
| 516 |
}% |
| 517 |
|
| 518 |
% Apply current variant after registering both |
| 519 |
\moloch@apply@current@variant |
| 520 |
} |
| 521 |
% \end{macrocode} |
| 522 |
% \end{macro} |
| 523 |
% |
| 524 |
% \begin{macro}{\moloch@colortheme@paper} |
| 525 |
% A crisp and clean color scheme with white frametitle |
| 526 |
% background and high contrast. |
| 527 |
% |
| 528 |
% \begin{macrocode} |
| 529 |
\newcommand{\moloch@colortheme@paper}{% |
| 530 |
\moloch@register@light@colors{% |
| 531 |
\colorlet{mNormaltextFg}{black} |
| 532 |
\colorlet{mNormaltextBg}{white} |
| 533 |
\definecolor{mAlertFg}{HTML}{E5276F} |
| 534 |
\definecolor{mExampleFg}{HTML}{265DAB} |
| 535 |
\colorlet{mFrametitleFg}{black} |
| 536 |
\colorlet{mFrametitleBg}{white} |
| 537 |
\definecolor{mProgressbarFg}{HTML}{60BD68} |
| 538 |
\colorlet{mProgressbarBg}{black!20} |
| 539 |
\definecolor{mTitleseparatorFg}{HTML}{F15854} |
| 540 |
\colorlet{mStandoutFg}{white} |
| 541 |
\colorlet{mStandoutBg}{black!60} |
| 542 |
\colorlet{mFootnoteFg}{black!90} |
| 543 |
|
| 544 |
\moloch@apply@semantic@colors |
| 545 |
}% |
| 546 |
|
| 547 |
\moloch@register@dark@colors{% |
| 548 |
\colorlet{mNormaltextFg}{white} |
| 549 |
\colorlet{mNormaltextBg}{black!80} |
| 550 |
\definecolor{mAlertFg}{HTML}{F17CB0} |
| 551 |
\definecolor{mExampleFg}{HTML}{88BDE6} |
| 552 |
\colorlet{mFrametitleFg}{white} |
| 553 |
\colorlet{mFrametitleBg}{black!80} |
| 554 |
\definecolor{mProgressbarFg}{HTML}{90CD97} |
| 555 |
\colorlet{mProgressbarBg}{black!70} |
| 556 |
\definecolor{mTitleseparatorFg}{HTML}{F15854} |
| 557 |
\colorlet{mStandoutFg}{white} |
| 558 |
\colorlet{mStandoutBg}{black!60} |
| 559 |
\colorlet{mFootnoteFg}{black!90} |
| 560 |
|
| 561 |
\moloch@apply@semantic@colors |
| 562 |
}% |
| 563 |
|
| 564 |
% Apply current variant after registering both |
| 565 |
\moloch@apply@current@variant |
| 566 |
} |
| 567 |
% \end{macrocode} |
| 568 |
% \end{macro} |
| 569 |
% |
| 570 |
% \begin{macro}{\moloch@colortheme@highcontrast} |
| 571 |
% High contrast color scheme for better accessibility. |
| 572 |
% \begin{macrocode} |
| 573 |
\newcommand{\moloch@colortheme@highcontrast}{% |
| 574 |
% Define high contrast colors |
| 575 |
\definecolor{mAlert}{HTML}{AD003D}% |
| 576 |
\definecolor{mExample}{HTML}{005580}% |
| 577 |
|
| 578 |
% Register light variant |
| 579 |
\moloch@register@light@colors{% |
| 580 |
\colorlet{mNormaltextFg}{black} |
| 581 |
\colorlet{mNormaltextBg}{white} |
| 582 |
\definecolor{mAlertFg}{HTML}{C66526} |
| 583 |
\definecolor{mExampleFg}{HTML}{3070AD} |
| 584 |
\colorlet{mFrametitleFg}{white} |
| 585 |
\colorlet{mFrametitleBg}{black} |
| 586 |
\colorlet{mProgressbarFg}{mAlertFg} |
| 587 |
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30} |
| 588 |
\colorlet{mTitleseparatorFg}{mAlertFg} |
| 589 |
\colorlet{mStandoutFg}{black} |
| 590 |
\colorlet{mStandoutBg}{white} |
| 591 |
\colorlet{mFootnoteFg}{mNormaltextFg!90} |
| 592 |
|
| 593 |
\moloch@apply@semantic@colors |
| 594 |
}% |
| 595 |
\definecolor{mAlertDark}{HTML}{F7768E}% |
| 596 |
\definecolor{mExampleDark}{HTML}{7AA2F7}% |
| 597 |
|
| 598 |
% Register dark variant |
| 599 |
\moloch@register@dark@colors{% |
| 600 |
\colorlet{mNormaltextFg}{white} |
| 601 |
\colorlet{mNormaltextBg}{black} |
| 602 |
\definecolor{mAlertFg}{HTML}{DCA237} |
| 603 |
\definecolor{mExampleFg}{HTML}{6FB2E4} |
| 604 |
\colorlet{mFrametitleFg}{black} |
| 605 |
\colorlet{mFrametitleBg}{white} |
| 606 |
\colorlet{mProgressbarFg}{mAlertFg} |
| 607 |
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!70} |
| 608 |
\colorlet{mTitleseparatorFg}{mAlertFg} |
| 609 |
\colorlet{mStandoutFg}{white} |
| 610 |
\colorlet{mStandoutBg}{black} |
| 611 |
\colorlet{mFootnoteFg}{mNormaltextFg!90} |
| 612 |
|
| 613 |
\moloch@apply@semantic@colors |
| 614 |
}% |
| 615 |
|
| 616 |
% Apply current variant after registering both |
| 617 |
\moloch@apply@current@variant |
| 618 |
} |
| 619 |
% \end{macrocode} |
| 620 |
% \end{macro} |
| 621 |
% |
| 622 |
% |
| 623 |
% \begin{macro}{\moloch@colortheme@catppuccin} |
| 624 |
% A color theme with soothing pastels and |
| 625 |
% light contrasts. |
| 626 |
% |
| 627 |
% \begin{macrocode} |
| 628 |
\newcommand{\moloch@colortheme@catppuccin}{% |
| 629 |
\moloch@register@light@colors{% |
| 630 |
\definecolor{mNormaltextFg}{HTML}{4C4F69} |
| 631 |
\definecolor{mNormaltextBg}{HTML}{EFF1F5} |
| 632 |
\definecolor{mAlertFg}{HTML}{D20F39} |
| 633 |
\definecolor{mExampleFg}{HTML}{1E66F5} |
| 634 |
\definecolor{mFrametitleFg}{HTML}{CAD3F5} |
| 635 |
\definecolor{mFrametitleBg}{HTML}{303446} |
| 636 |
\definecolor{mProgressbarFg}{HTML}{DC8A78} |
| 637 |
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30} |
| 638 |
\definecolor{mTitleseparatorFg}{HTML}{40A02B} |
| 639 |
\definecolor{mStandoutFg}{HTML}{CAD3F5} |
| 640 |
\definecolor{mStandoutBg}{HTML}{303446} |
| 641 |
\colorlet{mFootnoteFg}{mNormaltextFg!90} |
| 642 |
|
| 643 |
\moloch@apply@semantic@colors |
| 644 |
}% |
| 645 |
|
| 646 |
\moloch@register@dark@colors{% |
| 647 |
\definecolor{mNormaltextFg}{HTML}{CAD3F5} |
| 648 |
\definecolor{mNormaltextBg}{HTML}{24273A} |
| 649 |
\definecolor{mAlertFg}{HTML}{ED8796} |
| 650 |
\definecolor{mExampleFg}{HTML}{8AADF4} |
| 651 |
\definecolor{mFrametitleFg}{HTML}{CAD3F5} |
| 652 |
\definecolor{mFrametitleBg}{HTML}{24273A} |
| 653 |
\definecolor{mProgressbarFg}{HTML}{EED49F} |
| 654 |
\colorlet{mProgressbarBg}{mProgressbarFg!20!black!90} |
| 655 |
\definecolor{mTitleseparatorFg}{HTML}{A6DA95} |
| 656 |
\definecolor{mStandoutFg}{HTML}{4C4F69} |
| 657 |
\definecolor{mStandoutBg}{HTML}{CCD0DA} |
| 658 |
\colorlet{mFootnoteFg}{mNormaltextFg!90} |
| 659 |
|
| 660 |
\moloch@apply@semantic@colors |
| 661 |
}% |
| 662 |
|
| 663 |
% Apply current variant after registering both |
| 664 |
\moloch@apply@current@variant |
| 665 |
} |
| 666 |
% \end{macrocode} |
| 667 |
% \end{macro} |
| 668 |
% |
| 669 |
% \subsubsection{New Color System} |
| 670 |
% |
| 671 |
% The color system provides a unified interface for theme selection, variant |
| 672 |
% switching, and granular color customization. It uses pgfkeys to organize |
| 673 |
% options into a \texttt{/moloch/colors/} namespace. |
| 674 |
% |
| 675 |
% The system supports three layers of customization: |
| 676 |
% \begin{enumerate} |
| 677 |
% \item Theme presets (default, tomorrow, highcontrast) |
| 678 |
% \item Variant switching (light/dark) |
| 679 |
% \item Per-variant color overrides for individual elements |
| 680 |
% \end{enumerate} |
| 681 |
% |
| 682 |
% All customizations are preserved when switching between variants, allowing |
| 683 |
% users to set up colors once and then freely toggle between light and dark |
| 684 |
% modes without losing their customizations. |
| 685 |
% |
| 686 |
% \begin{macro}{Color theme and variant options} |
| 687 |
% The main pgfkeys tree defines theme selection, variant switching, and |
| 688 |
% the storage system for user customizations. Storage keys are defined |
| 689 |
% first to declare the macros, then initialized to empty, and finally |
| 690 |
% the actual color setting commands reference these storage macros. |
| 691 |
% |
| 692 |
% The storage system uses a convention: for each customizable color, |
| 693 |
% there are separate storage macros for light and dark variants named |
| 694 |
% \verb|\moloch@store@<variant>@<color>@<property>|. For example: |
| 695 |
% \verb|\moloch@store@light@progressbar@fg| stores the light variant's |
| 696 |
% progress bar foreground color. |
| 697 |
% \begin{macrocode} |
| 698 |
\pgfkeys{ |
| 699 |
/moloch/colors/.cd, |
| 700 |
theme/.is choice, |
| 701 |
theme/default/.code=\moloch@colortheme@default, |
| 702 |
theme/tomorrow/.code=\moloch@colortheme@tomorrow, |
| 703 |
theme/highcontrast/.code=\moloch@colortheme@highcontrast, |
| 704 |
theme/paper/.code=\moloch@colortheme@paper, |
| 705 |
theme/catppuccin/.code=\moloch@colortheme@catppuccin, |
| 706 |
variant/.is choice, |
| 707 |
variant/light/.code={% |
| 708 |
\moloch@variant@darkfalse |
| 709 |
\moloch@colors@light |
| 710 |
}, |
| 711 |
variant/dark/.code={% |
| 712 |
\moloch@variant@darktrue |
| 713 |
\moloch@colors@dark |
| 714 |
}, |
| 715 |
% Storage keys - store in macros |
| 716 |
% These define the storage macros that will hold user customizations |
| 717 |
store/light/alerted text/.store in=\moloch@store@light@alerted@text, |
| 718 |
store/dark/alerted text/.store in=\moloch@store@dark@alerted@text, |
| 719 |
store/light/frametitle fg/.store in=\moloch@store@light@frametitle@fg, |
| 720 |
store/dark/frametitle fg/.store in=\moloch@store@dark@frametitle@fg, |
| 721 |
store/light/frametitle bg/.store in=\moloch@store@light@frametitle@bg, |
| 722 |
store/dark/frametitle bg/.store in=\moloch@store@dark@frametitle@bg, |
| 723 |
store/light/example text/.store in=\moloch@store@light@example@text, |
| 724 |
store/dark/example text/.store in=\moloch@store@dark@example@text, |
| 725 |
store/light/progressbar fg/.store in=\moloch@store@light@progressbar@fg, |
| 726 |
store/dark/progressbar fg/.store in=\moloch@store@dark@progressbar@fg, |
| 727 |
store/light/progressbar bg/.store in=\moloch@store@light@progressbar@bg, |
| 728 |
store/dark/progressbar bg/.store in=\moloch@store@dark@progressbar@bg, |
| 729 |
store/light/standout fg/.store in=\moloch@store@light@standout@fg, |
| 730 |
store/dark/standout fg/.store in=\moloch@store@dark@standout@fg, |
| 731 |
store/light/standout bg/.store in=\moloch@store@light@standout@bg, |
| 732 |
store/dark/standout bg/.store in=\moloch@store@dark@standout@bg, |
| 733 |
store/light/normal text fg/.store in=\moloch@store@light@normal@text@fg, |
| 734 |
store/dark/normal text fg/.store in=\moloch@store@dark@normal@text@fg, |
| 735 |
store/light/normal text bg/.store in=\moloch@store@light@normal@text@bg, |
| 736 |
store/dark/normal text bg/.store in=\moloch@store@dark@normal@text@bg, |
| 737 |
store/light/title separator/.store in=\moloch@store@light@title@separator, |
| 738 |
store/dark/title separator/.store in=\moloch@store@dark@title@separator, |
| 739 |
% Initialize storage macros as empty |
| 740 |
% This prevents errors when checking if macros are set |
| 741 |
store/light/alerted text=, |
| 742 |
store/dark/alerted text=, |
| 743 |
store/light/frametitle fg=, |
| 744 |
store/dark/frametitle fg=, |
| 745 |
store/light/frametitle bg=, |
| 746 |
store/dark/frametitle bg=, |
| 747 |
store/light/example text=, |
| 748 |
store/dark/example text=, |
| 749 |
store/light/progressbar fg=, |
| 750 |
store/dark/progressbar fg=, |
| 751 |
store/light/progressbar bg=, |
| 752 |
store/dark/progressbar bg=, |
| 753 |
store/light/standout fg=, |
| 754 |
store/dark/standout fg=, |
| 755 |
store/light/standout bg=, |
| 756 |
store/dark/standout bg=, |
| 757 |
store/light/normal text fg=, |
| 758 |
store/dark/normal text fg=, |
| 759 |
store/light/normal text bg=, |
| 760 |
store/dark/normal text bg=, |
| 761 |
store/light/title separator=, |
| 762 |
store/dark/title separator=, |
| 763 |
% Color setting commands |
| 764 |
% Each color has three variants: |
| 765 |
% 1. Variant-agnostic: sets current variant + stores for current |
| 766 |
% 2. light/<color>: sets if in light mode, always stores for light |
| 767 |
% 3. dark/<color>: sets if in dark mode, always stores for dark |
| 768 |
progressbar fg/.code={% |
| 769 |
\setbeamercolor{progress bar}{fg=#1}% |
| 770 |
\moloch@setup@progressbar@parents |
| 771 |
\ifmoloch@variant@dark |
| 772 |
\pgfkeys{/moloch/colors/store/dark/progressbar fg=#1}% |
| 773 |
\else |
| 774 |
\pgfkeys{/moloch/colors/store/light/progressbar fg=#1}% |
| 775 |
\fi |
| 776 |
}, |
| 777 |
light/progressbar fg/.code={% |
| 778 |
\pgfkeys{/moloch/colors/store/light/progressbar fg=#1}% |
| 779 |
\ifmoloch@variant@dark\else |
| 780 |
\setbeamercolor{progress bar}{fg=#1}% |
| 781 |
\moloch@setup@progressbar@parents |
| 782 |
\fi |
| 783 |
}, |
| 784 |
dark/progressbar fg/.code={% |
| 785 |
\pgfkeys{/moloch/colors/store/dark/progressbar fg=#1}% |
| 786 |
\ifmoloch@variant@dark |
| 787 |
\setbeamercolor{progress bar}{fg=#1}% |
| 788 |
\moloch@setup@progressbar@parents |
| 789 |
\fi |
| 790 |
}, |
| 791 |
progressbar bg/.code={% |
| 792 |
\setbeamercolor{progress bar}{bg=#1}% |
| 793 |
\moloch@setup@progressbar@parents |
| 794 |
\ifmoloch@variant@dark |
| 795 |
\pgfkeys{/moloch/colors/store/dark/progressbar bg=#1}% |
| 796 |
\else |
| 797 |
\pgfkeys{/moloch/colors/store/light/progressbar bg=#1}% |
| 798 |
\fi |
| 799 |
}, |
| 800 |
light/progressbar bg/.code={% |
| 801 |
\pgfkeys{/moloch/colors/store/light/progressbar bg=#1}% |
| 802 |
\ifmoloch@variant@dark\else |
| 803 |
\setbeamercolor{progress bar}{bg=#1}% |
| 804 |
\moloch@setup@progressbar@parents |
| 805 |
\fi |
| 806 |
}, |
| 807 |
dark/progressbar bg/.code={% |
| 808 |
\pgfkeys{/moloch/colors/store/dark/progressbar bg=#1}% |
| 809 |
\ifmoloch@variant@dark |
| 810 |
\setbeamercolor{progress bar}{bg=#1}% |
| 811 |
\moloch@setup@progressbar@parents |
| 812 |
\fi |
| 813 |
}, |
| 814 |
normal text fg/.code={% |
| 815 |
\setbeamercolor{normal text}{fg=#1}% |
| 816 |
\moloch@setup@text@colors |
| 817 |
\moloch@setup@block@colors |
| 818 |
\ifmoloch@variant@dark |
| 819 |
\pgfkeys{/moloch/colors/store/dark/normal text fg=#1}% |
| 820 |
\else |
| 821 |
\pgfkeys{/moloch/colors/store/light/normal text fg=#1}% |
| 822 |
\fi |
| 823 |
}, |
| 824 |
light/normal text fg/.code={% |
| 825 |
\pgfkeys{/moloch/colors/store/light/normal text fg=#1}% |
| 826 |
\ifmoloch@variant@dark\else |
| 827 |
\setbeamercolor{normal text}{fg=#1}% |
| 828 |
\moloch@setup@text@colors |
| 829 |
\moloch@setup@block@colors |
| 830 |
\fi |
| 831 |
}, |
| 832 |
dark/normal text fg/.code={% |
| 833 |
\pgfkeys{/moloch/colors/store/dark/normal text fg=#1}% |
| 834 |
\ifmoloch@variant@dark |
| 835 |
\setbeamercolor{normal text}{fg=#1}% |
| 836 |
\moloch@setup@text@colors |
| 837 |
\moloch@setup@block@colors |
| 838 |
\fi |
| 839 |
}, |
| 840 |
normal text bg/.code={% |
| 841 |
\setbeamercolor{normal text}{bg=#1}% |
| 842 |
\ifmoloch@variant@dark |
| 843 |
\pgfkeys{/moloch/colors/store/dark/normal text bg=#1}% |
| 844 |
\else |
| 845 |
\pgfkeys{/moloch/colors/store/light/normal text bg=#1}% |
| 846 |
\fi |
| 847 |
}, |
| 848 |
light/normal text bg/.code={% |
| 849 |
\pgfkeys{/moloch/colors/store/light/normal text bg=#1}% |
| 850 |
\ifmoloch@variant@dark\else |
| 851 |
\setbeamercolor{normal text}{bg=#1}% |
| 852 |
\fi |
| 853 |
}, |
| 854 |
dark/normal text bg/.code={% |
| 855 |
\pgfkeys{/moloch/colors/store/dark/normal text bg=#1}% |
| 856 |
\ifmoloch@variant@dark |
| 857 |
\setbeamercolor{normal text}{bg=#1}% |
| 858 |
\fi |
| 859 |
}, |
| 860 |
alerted text/.code={% |
| 861 |
\setbeamercolor{alerted text}{fg=#1}% |
| 862 |
\setbeamercolor{block title alerted}{fg=#1}% |
| 863 |
\ifmoloch@variant@dark |
| 864 |
\pgfkeys{/moloch/colors/store/dark/alerted text=#1}% |
| 865 |
\else |
| 866 |
\pgfkeys{/moloch/colors/store/light/alerted text=#1}% |
| 867 |
\fi |
| 868 |
}, |
| 869 |
light/alerted text/.code={% |
| 870 |
\pgfkeys{/moloch/colors/store/light/alerted text=#1}% |
| 871 |
\ifmoloch@variant@dark\else |
| 872 |
\setbeamercolor{alerted text}{fg=#1}% |
| 873 |
\setbeamercolor{block title alerted}{fg=#1}% |
| 874 |
\fi |
| 875 |
}, |
| 876 |
dark/alerted text/.code={% |
| 877 |
\pgfkeys{/moloch/colors/store/dark/alerted text=#1}% |
| 878 |
\ifmoloch@variant@dark |
| 879 |
\setbeamercolor{alerted text}{fg=#1}% |
| 880 |
\setbeamercolor{block title alerted}{fg=#1}% |
| 881 |
\fi |
| 882 |
}, |
| 883 |
example text/.code={% |
| 884 |
\setbeamercolor{example text}{fg=#1}% |
| 885 |
\setbeamercolor{block title example}{fg=#1}% |
| 886 |
\ifmoloch@variant@dark |
| 887 |
\pgfkeys{/moloch/colors/store/dark/example text=#1}% |
| 888 |
\else |
| 889 |
\pgfkeys{/moloch/colors/store/light/example text=#1}% |
| 890 |
\fi |
| 891 |
}, |
| 892 |
light/example text/.code={% |
| 893 |
\pgfkeys{/moloch/colors/store/light/example text=#1}% |
| 894 |
\ifmoloch@variant@dark\else |
| 895 |
\setbeamercolor{example text}{fg=#1}% |
| 896 |
\setbeamercolor{block title example}{fg=#1}% |
| 897 |
\fi |
| 898 |
}, |
| 899 |
dark/example text/.code={% |
| 900 |
\pgfkeys{/moloch/colors/store/dark/example text=#1}% |
| 901 |
\ifmoloch@variant@dark |
| 902 |
\setbeamercolor{example text}{fg=#1}% |
| 903 |
\setbeamercolor{block title example}{fg=#1}% |
| 904 |
\fi |
| 905 |
}, |
| 906 |
frametitle fg/.code={% |
| 907 |
\setbeamercolor{frametitle}{fg=#1}% |
| 908 |
\ifmoloch@variant@dark |
| 909 |
\pgfkeys{/moloch/colors/store/dark/frametitle fg=#1}% |
| 910 |
\else |
| 911 |
\pgfkeys{/moloch/colors/store/light/frametitle fg=#1}% |
| 912 |
\fi |
| 913 |
}, |
| 914 |
frametitle bg/.code={% |
| 915 |
\setbeamercolor{frametitle}{bg=#1}% |
| 916 |
\ifmoloch@variant@dark |
| 917 |
\pgfkeys{/moloch/colors/store/dark/frametitle bg=#1}% |
| 918 |
\else |
| 919 |
\pgfkeys{/moloch/colors/store/light/frametitle bg=#1}% |
| 920 |
\fi |
| 921 |
}, |
| 922 |
light/frametitle fg/.code={% |
| 923 |
\pgfkeys{/moloch/colors/store/light/frametitle fg=#1}% |
| 924 |
\ifmoloch@variant@dark\else |
| 925 |
\setbeamercolor{frametitle}{fg=#1}% |
| 926 |
\fi |
| 927 |
}, |
| 928 |
dark/frametitle fg/.code={% |
| 929 |
\pgfkeys{/moloch/colors/store/dark/frametitle fg=#1}% |
| 930 |
\ifmoloch@variant@dark |
| 931 |
\setbeamercolor{frametitle}{fg=#1}% |
| 932 |
\fi |
| 933 |
}, |
| 934 |
light/frametitle bg/.code={% |
| 935 |
\pgfkeys{/moloch/colors/store/light/frametitle bg=#1}% |
| 936 |
\ifmoloch@variant@dark\else |
| 937 |
\setbeamercolor{frametitle}{bg=#1}% |
| 938 |
\fi |
| 939 |
}, |
| 940 |
dark/frametitle bg/.code={% |
| 941 |
\pgfkeys{/moloch/colors/store/dark/frametitle bg=#1}% |
| 942 |
\ifmoloch@variant@dark |
| 943 |
\setbeamercolor{frametitle}{bg=#1}% |
| 944 |
\fi |
| 945 |
}, |
| 946 |
standout fg/.code={% |
| 947 |
\setbeamercolor{standout}{fg=#1}% |
| 948 |
}, |
| 949 |
light/standout fg/.code={% |
| 950 |
\pgfkeys{/moloch/colors/store/light/standout fg=#1}% |
| 951 |
\ifmoloch@variant@dark\else |
| 952 |
\setbeamercolor{standout}{fg=#1}% |
| 953 |
\fi |
| 954 |
}, |
| 955 |
dark/standout fg/.code={% |
| 956 |
\pgfkeys{/moloch/colors/store/dark/standout fg=#1}% |
| 957 |
\ifmoloch@variant@dark |
| 958 |
\setbeamercolor{standout}{fg=#1}% |
| 959 |
\fi |
| 960 |
}, |
| 961 |
standout bg/.code={% |
| 962 |
\setbeamercolor{standout}{bg=#1}% |
| 963 |
}, |
| 964 |
light/standout bg/.code={% |
| 965 |
\pgfkeys{/moloch/colors/store/light/standout bg=#1}% |
| 966 |
\ifmoloch@variant@dark\else |
| 967 |
\setbeamercolor{standout}{bg=#1}% |
| 968 |
\fi |
| 969 |
}, |
| 970 |
dark/standout bg/.code={% |
| 971 |
\pgfkeys{/moloch/colors/store/dark/standout bg=#1}% |
| 972 |
\ifmoloch@variant@dark |
| 973 |
\setbeamercolor{standout}{bg=#1}% |
| 974 |
\fi |
| 975 |
}, |
| 976 |
title separator/.code={% |
| 977 |
\setbeamercolor{title separator}{fg=#1}% |
| 978 |
\ifmoloch@variant@dark |
| 979 |
\pgfkeys{/moloch/colors/store/dark/title separator=#1}% |
| 980 |
\else |
| 981 |
\pgfkeys{/moloch/colors/store/light/title separator=#1}% |
| 982 |
\fi |
| 983 |
}, |
| 984 |
light/title separator/.code={% |
| 985 |
\pgfkeys{/moloch/colors/store/light/title separator=#1}% |
| 986 |
\ifmoloch@variant@dark\else |
| 987 |
\setbeamercolor{title separator}{fg=#1}% |
| 988 |
\fi |
| 989 |
}, |
| 990 |
dark/title separator/.code={% |
| 991 |
\pgfkeys{/moloch/colors/store/dark/title separator=#1}% |
| 992 |
\ifmoloch@variant@dark |
| 993 |
\setbeamercolor{title separator}{fg=#1}% |
| 994 |
\fi |
| 995 |
}, |
| 996 |
} |
| 997 |
% \end{macrocode} |
| 998 |
% \end{macro} |
| 999 |
% |
| 1000 |
% \begin{macro}{\molochcolors} |
| 1001 |
% User-facing command for color customization. |
| 1002 |
% \begin{macrocode} |
| 1003 |
\newcommand{\molochcolors}[1]{\pgfkeys{/moloch/colors/.cd,#1}} |
| 1004 |
% \end{macrocode} |
| 1005 |
% \end{macro} |
| 1006 |
% |
| 1007 |
% The Moloch inner or outer themes optionally display progress |
| 1008 |
% bars in various locations. Their color is set by \verb|progress bar| but the two |
| 1009 |
% different kinds can be customized separately. The horizontal rule on the |
| 1010 |
% title page is also set based on the progress bar color and can be customized |
| 1011 |
% with \verb|title separator|. |
| 1012 |
% |
| 1013 |
% \begin{macrocode} |
| 1014 |
\setbeamercolor{progress bar}{% |
| 1015 |
use=alerted text, |
| 1016 |
fg=alerted text.fg, |
| 1017 |
bg=alerted text.fg!50!black!30 |
| 1018 |
} |
| 1019 |
\setbeamercolor{title separator}{ |
| 1020 |
use=progress bar, |
| 1021 |
parent=progress bar |
| 1022 |
} |
| 1023 |
\setbeamercolor{progress bar in head/foot}{% |
| 1024 |
use=progress bar, |
| 1025 |
parent=progress bar |
| 1026 |
} |
| 1027 |
\setbeamercolor{progress bar in section page}{ |
| 1028 |
use=progress bar, |
| 1029 |
parent=progress bar |
| 1030 |
} |
| 1031 |
% \end{macrocode} |
| 1032 |
% |
| 1033 |
% Block environments such as \verb|theorem| and \verb|example| have no background color |
| 1034 |
% by default. The option \verb|block=fill| sets a background color based on the |
| 1035 |
% background and foreground of \verb|normal text|. The option \verb|block=transparent| |
| 1036 |
% reverts the block environments to an empty background, which can be useful |
| 1037 |
% if changing colors mid-presentation. |
| 1038 |
% |
| 1039 |
% \begin{macrocode} |
| 1040 |
\newcommand{\moloch@block@transparent}{ |
| 1041 |
\setbeamercolor{block title}{bg=} |
| 1042 |
\setbeamercolor{block body}{bg=} |
| 1043 |
\setbeamercolor{block title alerted}{bg=} |
| 1044 |
\setbeamercolor{block title example}{bg=} |
| 1045 |
} |
| 1046 |
\newcommand{\moloch@block@fill}{ |
| 1047 |
\setbeamercolor{block title}{% |
| 1048 |
bg=normal text.bg!80!fg |
| 1049 |
} |
| 1050 |
\setbeamercolor{block body}{% |
| 1051 |
use=block title, |
| 1052 |
bg=block title.bg!50!normal text.bg |
| 1053 |
} |
| 1054 |
\setbeamercolor{block title alerted}{% |
| 1055 |
bg=block title.bg, |
| 1056 |
} |
| 1057 |
\setbeamercolor{block title example}{% |
| 1058 |
bg=block title.bg, |
| 1059 |
} |
| 1060 |
} |
| 1061 |
% |
| 1062 |
% We also reset the bibliography colors in order to pick up the surrounding |
| 1063 |
% colors at the time of use. This prevents us having to set the correct color in |
| 1064 |
% normal and standout mode. |
| 1065 |
% |
| 1066 |
% \begin{macrocode} |
| 1067 |
\setbeamercolor{bibliography entry author}{fg=, bg=} |
| 1068 |
\setbeamercolor{bibliography entry title}{fg=, bg=} |
| 1069 |
\setbeamercolor{bibliography entry location}{fg=, bg=} |
| 1070 |
\setbeamercolor{bibliography entry note}{fg=, bg=} |
| 1071 |
% \end{macrocode} |
| 1072 |
% |
| 1073 |
% \subsubsection{Process Package Options} |
| 1074 |
% |
| 1075 |
% \begin{macrocode} |
| 1076 |
\moloch@colortheme@default |
| 1077 |
\moloch@color@setdefaults |
| 1078 |
\ProcessPgfPackageOptions{/moloch/color} |
| 1079 |
% \end{macrocode} |
| 1080 |
% |
| 1081 |
% \begin{macrocode} |
| 1082 |
\mode<all> |
| 1083 |
% \end{macrocode} |
| 1084 |
% |
| 1085 |
% \iffalse |
| 1086 |
%</package> |
| 1087 |
% \fi |
| 1088 |
% \Finale |
| 1089 |
\endinput |