Appendix E — Color Theme
Source file: src/beamercolorthememoloch.dtx
E.1 Moloch Color Theme
E.1.1 Package Dependencies
\RequirePackage{pgfopts}E.1.2 Options
E.1.3 block
Optionally adds a light grey background to block environments like theorem and example.
\pgfkeys{
/moloch/color/block/.cd,
.is choice,
transparent/.code=\moloch@block@transparent,
fill/.code=\moloch@block@fill,
}E.1.4 Variant tracking
Boolean to track whether we’re in dark or light variant.
\newif\ifmoloch@variant@dark
\moloch@variant@darkfalse % Default to light variantE.1.5 colors
Provides the option to have a dark background and light foreground instead of the reverse.
\pgfkeys{
/moloch/color/background/.cd,
.is choice,
dark/.code={%
\PackageWarning{beamercolorthememoloch}{%
Option 'background' is deprecated.\MessageBreak
Use 'colortheme variant=light/dark' instead
}%
\moloch@colors@dark
},
light/.code={%
\moloch@colors@light
},
}E.1.6 \moloch@color@setdefaults
Sets default values for color theme options.
\newcommand{\moloch@color@setdefaults}{
\pgfkeys{/moloch/color/.cd,
background=light,
}
}E.1.7 Base Colors
These are the base colors used in the default Moloch color theme. They are kept here mostly for backwards compatibility, and colors for the themes are now defined in the preset commands below.
\definecolor{mDarkBrown}{HTML}{604c38}
\definecolor{mDarkTeal}{HTML}{23373b}
\definecolor{mLightBrown}{HTML}{EB811B}
\definecolor{mLightGreen}{RGB}{0,128,128}E.1.8 Hooks for Color Themes
Moloch color themes can register light and dark color schemes using the commands below. The registered colors will be stored in the macros \moloch@define@light@colors and \moloch@define@dark@colors respectively. These macros are invoked when the variant=light or variant=dark options are selected, allowing theme presets to define complete color schemes for both variants.
E.1.9 \moloch@define@light@colors
E.1.10 \moloch@define@dark@colors
Storage macros for the light and dark color definitions. Initialized empty and filled by color theme presets via the registration commands.
\newcommand{\moloch@define@light@colors}{}
\newcommand{\moloch@define@dark@colors}{}E.1.11 \moloch@register@light@colors
Allows color theme presets to register their light variant color scheme. The argument should contain \setbeamercolor commands that define all necessary colors for the light variant.
\newcommand{\moloch@register@light@colors}[1]{%
\renewcommand{\moloch@define@light@colors}{#1}%
}E.1.12 \moloch@register@dark@colors
Allows color theme presets to register their dark variant color scheme. The argument should contain \setbeamercolor commands that define all necessary colors for the dark variant.
\newcommand{\moloch@register@dark@colors}[1]{%
\renewcommand{\moloch@define@dark@colors}{#1}%
}E.1.13 \moloch@setup@block@colors
Configures the colors for block environments to derive from normal text and alerted/example text colors. This is called after switching variants to ensure block colors stay consistent with the current color scheme. Block titles inherit from normal text foreground, while alerted and example block titles additionally use their respective text colors.
\newcommand{\moloch@setup@block@colors}{%
\setbeamercolor{block title}{%
use=normal text,
fg=normal text.fg,
bg=
}%
\setbeamercolor{block title alerted}{%
use={block title, alerted text}
}%
\setbeamercolor{block title example}{%
use={block title, example text}
}%
\setbeamercolor{block body alerted}{use=block body, parent=block body}%
\setbeamercolor{block body example}{use=block body, parent=block body}%
}E.1.14 \moloch@setup@text@colors
Configures title-related colors to derive from normal text. This ensures that when normal text color changes (e.g., during variant switching), all title elements automatically adapt. Institute and thanks use a slightly muted version (80% mix) for visual hierarchy.
\newcommand{\moloch@setup@text@colors}{%
\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}%
\setbeamercolor{thanks}{%
use=normal text,fg=normal text.fg!80!normal text.bg}%
}E.1.15 \moloch@setup@progressbar@parents
Updates colors that derive from the progress bar color. This includes the title separator (horizontal rule on title page) and progress bars in various locations (head, foot, section pages). Called whenever the progress bar foreground or background color is customized.
\newcommand{\moloch@setup@progressbar@parents}{%
\setbeamercolor{progress bar in head/foot}{%
use=progress bar,
parent=progress bar
}%
\setbeamercolor{progress bar in section page}{%
use=progress bar,
parent=progress bar
}%
}E.1.16 Variant Switching Commands
E.1.17 \moloch@colors@dark
Switches to the dark variant color scheme. This command:
Sets the dark variant flag
Applies the registered dark colors from the current theme preset
Ensures normal text color is active
Updates dependent colors (blocks, text) to match
Applies any stored user customizations for the dark variant
\newcommand{\moloch@colors@dark}{
\moloch@variant@darktrue
\moloch@define@dark@colors
\usebeamercolor[fg]{normal text}
\moloch@setup@block@colors
\moloch@setup@text@colors
% Apply stored dark variant colors
\moloch@apply@store@dark@colors
}E.1.18 \moloch@colors@light
Switches to the light variant color scheme. Mirrors the dark variant command but applies light colors instead. The sequence ensures that user customizations override theme defaults.
\newcommand{\moloch@colors@light}{
\moloch@variant@darkfalse
\moloch@define@light@colors
\usebeamercolor[fg]{normal text}
\moloch@setup@block@colors
\moloch@setup@text@colors
\setbeamercolor{title separator}{
use=progress bar,
parent=progress bar
}
\moloch@setup@progressbar@parents
% Apply stored light variant colors AFTER block definitions
\moloch@apply@store@light@colors
}E.1.19 \moloch@apply@current@variant
Helper command that applies the appropriate variant based on the \ifmoloch@variant@dark boolean flag. Used during initialization and when switching color theme presets to ensure the correct variant is applied.
\newcommand{\moloch@apply@current@variant}{%
\ifmoloch@variant@dark
\moloch@colors@dark
\else
\moloch@colors@light
\fi
}E.1.20 Color Customization Storage System
The storage system allows users to customize individual colors while preserving those customizations across variant switches. Each color option has separate storage for light and dark variants. When a user sets a color, it’s both applied immediately and stored. When switching variants, stored customizations are reapplied on top of the theme defaults.
E.1.21 \moloch@apply@store@light@colors
Applies stored user customizations for the light variant. Checks each storage macro and applies it if non-empty. This is called after applying the theme’s light colors to override with user preferences. For colors that affect multiple elements (like alerted text affecting both inline text and block titles), both are updated. Setup functions are called when needed to propagate changes to dependent colors.
\newcommand{\moloch@apply@store@light@colors}{%
\ifx\moloch@store@light@alerted@text\empty\else
\setbeamercolor{alerted text}{fg=\moloch@store@light@alerted@text}%
\setbeamercolor{block title alerted}{fg=\moloch@store@light@alerted@text}%
\fi
\ifx\moloch@store@light@example@text\empty\else
\setbeamercolor{example text}{fg=\moloch@store@light@example@text}%
\setbeamercolor{block title example}{fg=\moloch@store@light@example@text}%
\fi
\ifx\moloch@store@light@frametitle@fg\empty\else
\setbeamercolor{frametitle}{fg=\moloch@store@light@frametitle@fg}%
\fi
\ifx\moloch@store@light@frametitle@bg\empty\else
\setbeamercolor{frametitle}{bg=\moloch@store@light@frametitle@bg}%
\fi
\ifx\moloch@store@light@progressbar@fg\empty\else
\setbeamercolor{progress bar}{fg=\moloch@store@light@progressbar@fg}%
\moloch@setup@progressbar@parents
\fi
\ifx\moloch@store@light@progressbar@bg\empty\else
\setbeamercolor{progress bar}{bg=\moloch@store@light@progressbar@bg}%
\moloch@setup@progressbar@parents
\fi
\ifx\moloch@store@light@standout@fg\empty\else
\setbeamercolor{standout}{fg=\moloch@store@light@standout@fg}%
\fi
\ifx\moloch@store@light@standout@bg\empty\else
\setbeamercolor{standout}{bg=\moloch@store@light@standout@bg}%
\fi
\ifx\moloch@store@light@normal@text@fg\empty\else
\setbeamercolor{normal text}{fg=\moloch@store@light@normal@text@fg}%
\moloch@setup@text@colors
\moloch@setup@block@colors
\fi
\ifx\moloch@store@light@normal@text@bg\empty\else
\setbeamercolor{normal text}{bg=\moloch@store@light@normal@text@bg}%
\fi
}E.1.22 \moloch@apply@store@dark@colors
Applies stored user customizations for the dark variant. Mirrors the light variant application but for dark colors. The logic is identical: check each storage macro, apply if non-empty, and call setup functions for colors that affect dependent elements.
\newcommand{\moloch@apply@store@dark@colors}{%
\ifx\moloch@store@dark@alerted@text\empty\else
\setbeamercolor{alerted text}{fg=\moloch@store@dark@alerted@text}%
\setbeamercolor{block title alerted}{fg=\moloch@store@dark@alerted@text}%
\fi
\ifx\moloch@store@dark@example@text\empty\else
\setbeamercolor{example text}{fg=\moloch@store@dark@example@text}%
\setbeamercolor{block title example}{fg=\moloch@store@dark@example@text}%
\fi
\ifx\moloch@store@dark@frametitle@fg\empty\else
\setbeamercolor{frametitle}{fg=\moloch@store@dark@frametitle@fg}%
\fi
\ifx\moloch@store@dark@frametitle@bg\empty\else
\setbeamercolor{frametitle}{bg=\moloch@store@dark@frametitle@bg}%
\fi
\ifx\moloch@store@dark@progressbar@fg\empty\else
\setbeamercolor{progress bar}{fg=\moloch@store@dark@progressbar@fg}%
\moloch@setup@progressbar@parents
\fi
\ifx\moloch@store@dark@progressbar@bg\empty\else
\setbeamercolor{progress bar}{bg=\moloch@store@dark@progressbar@bg}%
\moloch@setup@progressbar@parents
\fi
\ifx\moloch@store@dark@standout@fg\empty\else
\setbeamercolor{standout}{fg=\moloch@store@dark@standout@fg}%
\fi
\ifx\moloch@store@dark@standout@bg\empty\else
\setbeamercolor{standout}{bg=\moloch@store@dark@standout@bg}%
\fi
\ifx\moloch@store@dark@normal@text@fg\empty\else
\setbeamercolor{normal text}{fg=\moloch@store@dark@normal@text@fg}%
\moloch@setup@text@colors
\moloch@setup@block@colors
\fi
\ifx\moloch@store@dark@normal@text@bg\empty\else
\setbeamercolor{normal text}{bg=\moloch@store@dark@normal@text@bg}%
\fi
}E.1.23 Semantic Color Helper
E.1.24 \moloch@apply@semantic@colors
Maps semantic color names to Beamer color definitions. This helper expects the following colors to be defined (via \definecolor or \colorlet) before being called:
mNormaltextFg- Normal text foregroundmNormaltextBg- Normal text backgroundmFrametitleFg- Frame title foregroundmFrametitleBg- Frame title backgroundmAlertFg- Alerted text foregroundmExampleFg- Example text foregroundmProgressbarFg- Progress bar foregroundmProgressbarBg- Progress bar backgroundmStandoutFg- Standout frame foregroundmStandoutBg- Standout frame backgroundmFootnoteFg- Footnote foreground
Color themes should define all these colors (using any color specification method: HTML, RGB, color names, or color expressions), then call this helper to apply them to the appropriate Beamer color elements.
\newcommand{\moloch@apply@semantic@colors}{%
% Apply semantic colors to Beamer color definitions
\setbeamercolor{normal text}{fg=mNormaltextFg, bg=mNormaltextBg}%
\setbeamercolor{frametitle}{fg=mFrametitleFg, bg=mFrametitleBg}%
\setbeamercolor{palette primary}{use=frametitle, parent=frametitle}%
\setbeamercolor{alerted text}{fg=mAlertFg}%
\setbeamercolor{example text}{fg=mExampleFg}%
\setbeamercolor{progress bar}{fg=mProgressbarFg, bg=mProgressbarBg}%
\setbeamercolor{title separator}{fg=mTitleseparatorFg}%
\setbeamercolor{footnote}{fg=mFootnoteFg}%
\setbeamercolor{footnote mark}{fg=.}%
\setbeamercolor{standout}{fg=mStandoutFg, bg=mStandoutBg}%
}E.1.25 Color Theme Presets
These commands define complete color schemes that can be switched between. Each preset registers both light and dark variants.
E.1.26 \moloch@colortheme@default
The default moloch color scheme.
\newcommand{\moloch@colortheme@default}{%
\moloch@register@light@colors{%
\definecolor{mNormaltextFg}{HTML}{23373b}
\colorlet{mNormaltextBg}{black!2}
\definecolor{mAlertFg}{HTML}{EB811B}
\definecolor{mExampleFg}{RGB}{0,128,128}
\colorlet{mFrametitleFg}{mNormaltextBg}
\colorlet{mFrametitleBg}{mNormaltextFg}
\colorlet{mProgressbarFg}{mAlertFg}
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30}
\colorlet{mTitleseparatorFg}{mProgressbarFg}
\colorlet{mStandoutFg}{mNormaltextBg}
\colorlet{mStandoutBg}{mNormaltextFg}
\colorlet{mFootnoteFg}{mNormaltextFg!90}
\moloch@apply@semantic@colors
}%
% Register dark variant - use brighter colors for better contrast
\moloch@register@dark@colors{%
\colorlet{mNormaltextFg}{black!2}
\definecolor{mNormaltextBg}{HTML}{23373b}
\definecolor{mAlertFg}{HTML}{EF9F76}
\definecolor{mExampleFg}{HTML}{5ABFB5}
\colorlet{mFrametitleFg}{mNormaltextBg}
\colorlet{mFrametitleBg}{black!15}
\colorlet{mProgressbarFg}{mAlertFg}
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30}
\colorlet{mTitleseparatorFg}{mProgressbarFg}
\colorlet{mStandoutFg}{mNormaltextBg}
\colorlet{mStandoutBg}{black!15}
\colorlet{mFootnoteFg}{mNormaltextFg!90}
\moloch@apply@semantic@colors
}%
% Apply current variant after registering both
\moloch@apply@current@variant
}E.1.27 \moloch@colortheme@tomorrow
The Tomorrow color scheme by Chris Kempson.
\newcommand{\moloch@colortheme@tomorrow}{%
\moloch@register@light@colors{%
\definecolor{mNormaltextFg}{HTML}{1d1f21}
\colorlet{mNormaltextBg}{white}
\definecolor{mAlertFg}{HTML}{cc6666}
\definecolor{mExampleFg}{HTML}{4271ae}
\colorlet{mFrametitleFg}{white}
\definecolor{mFrametitleBg}{HTML}{1d1f21}
\definecolor{mProgressbarFg}{HTML}{8959a8}
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30}
\definecolor{mTitleseparatorFg}{HTML}{8959a8}
\colorlet{mStandoutFg}{white}
\definecolor{mStandoutBg}{HTML}{1d1f21}
\definecolor{mFootnoteFg}{HTML}{1d1f21}
\moloch@apply@semantic@colors
}
\moloch@register@dark@colors{%
\colorlet{mNormaltextFg}{white}
\definecolor{mNormaltextBg}{HTML}{282a2e}
\definecolor{mAlertFg}{HTML}{de935f}
\definecolor{mExampleFg}{HTML}{7aa6da}
\colorlet{mFrametitleFg}{white}
\definecolor{mFrametitleBg}{HTML}{1d1f21}
\definecolor{mProgressbarFg}{HTML}{b294bb}
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30}
\definecolor{mTitleseparatorFg}{HTML}{b294bb}
\colorlet{mStandoutFg}{white}
\definecolor{mStandoutBg}{HTML}{1d1f21}
\definecolor{mFootnoteFg}{HTML}{1d1f21}
\moloch@apply@semantic@colors
}%
% Apply current variant after registering both
\moloch@apply@current@variant
}E.1.28 \moloch@colortheme@paper
A crisp and clean color scheme with white frametitle background and high contrast.
\newcommand{\moloch@colortheme@paper}{%
\moloch@register@light@colors{%
\colorlet{mNormaltextFg}{black}
\colorlet{mNormaltextBg}{white}
\definecolor{mAlertFg}{HTML}{E5276F}
\definecolor{mExampleFg}{HTML}{265DAB}
\colorlet{mFrametitleFg}{black}
\colorlet{mFrametitleBg}{white}
\definecolor{mProgressbarFg}{HTML}{60BD68}
\colorlet{mProgressbarBg}{black!20}
\definecolor{mTitleseparatorFg}{HTML}{F15854}
\colorlet{mStandoutFg}{white}
\colorlet{mStandoutBg}{black!60}
\colorlet{mFootnoteFg}{black!90}
\moloch@apply@semantic@colors
}%
\moloch@register@dark@colors{%
\colorlet{mNormaltextFg}{white}
\colorlet{mNormaltextBg}{black!80}
\definecolor{mAlertFg}{HTML}{F17CB0}
\definecolor{mExampleFg}{HTML}{88BDE6}
\colorlet{mFrametitleFg}{white}
\colorlet{mFrametitleBg}{black!80}
\definecolor{mProgressbarFg}{HTML}{90CD97}
\colorlet{mProgressbarBg}{black!70}
\definecolor{mTitleseparatorFg}{HTML}{F15854}
\colorlet{mStandoutFg}{white}
\colorlet{mStandoutBg}{black!60}
\colorlet{mFootnoteFg}{black!90}
\moloch@apply@semantic@colors
}%
% Apply current variant after registering both
\moloch@apply@current@variant
}E.1.29 \moloch@colortheme@highcontrast
High contrast color scheme for better accessibility.
\newcommand{\moloch@colortheme@highcontrast}{%
% Define high contrast colors
\definecolor{mAlert}{HTML}{AD003D}%
\definecolor{mExample}{HTML}{005580}%
% Register light variant
\moloch@register@light@colors{%
\colorlet{mNormaltextFg}{black}
\colorlet{mNormaltextBg}{white}
\definecolor{mAlertFg}{HTML}{C66526}
\definecolor{mExampleFg}{HTML}{3070AD}
\colorlet{mFrametitleFg}{white}
\colorlet{mFrametitleBg}{black}
\colorlet{mProgressbarFg}{mAlertFg}
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30}
\colorlet{mTitleseparatorFg}{mAlertFg}
\colorlet{mStandoutFg}{black}
\colorlet{mStandoutBg}{white}
\colorlet{mFootnoteFg}{mNormaltextFg!90}
\moloch@apply@semantic@colors
}%
\definecolor{mAlertDark}{HTML}{F7768E}%
\definecolor{mExampleDark}{HTML}{7AA2F7}%
% Register dark variant
\moloch@register@dark@colors{%
\colorlet{mNormaltextFg}{white}
\colorlet{mNormaltextBg}{black}
\definecolor{mAlertFg}{HTML}{DCA237}
\definecolor{mExampleFg}{HTML}{6FB2E4}
\colorlet{mFrametitleFg}{black}
\colorlet{mFrametitleBg}{white}
\colorlet{mProgressbarFg}{mAlertFg}
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!70}
\colorlet{mTitleseparatorFg}{mAlertFg}
\colorlet{mStandoutFg}{white}
\colorlet{mStandoutBg}{black}
\colorlet{mFootnoteFg}{mNormaltextFg!90}
\moloch@apply@semantic@colors
}%
% Apply current variant after registering both
\moloch@apply@current@variant
}E.1.30 \moloch@colortheme@catppuccin
A color theme with soothing pastels and light contrasts.
\newcommand{\moloch@colortheme@catppuccin}{%
\moloch@register@light@colors{%
\definecolor{mNormaltextFg}{HTML}{4C4F69}
\definecolor{mNormaltextBg}{HTML}{EFF1F5}
\definecolor{mAlertFg}{HTML}{D20F39}
\definecolor{mExampleFg}{HTML}{1E66F5}
\definecolor{mFrametitleFg}{HTML}{CAD3F5}
\definecolor{mFrametitleBg}{HTML}{303446}
\definecolor{mProgressbarFg}{HTML}{DC8A78}
\colorlet{mProgressbarBg}{mProgressbarFg!50!black!30}
\definecolor{mTitleseparatorFg}{HTML}{40A02B}
\definecolor{mStandoutFg}{HTML}{CAD3F5}
\definecolor{mStandoutBg}{HTML}{303446}
\colorlet{mFootnoteFg}{mNormaltextFg!90}
\moloch@apply@semantic@colors
}%
\moloch@register@dark@colors{%
\definecolor{mNormaltextFg}{HTML}{CAD3F5}
\definecolor{mNormaltextBg}{HTML}{24273A}
\definecolor{mAlertFg}{HTML}{ED8796}
\definecolor{mExampleFg}{HTML}{8AADF4}
\definecolor{mFrametitleFg}{HTML}{CAD3F5}
\definecolor{mFrametitleBg}{HTML}{24273A}
\definecolor{mProgressbarFg}{HTML}{EED49F}
\colorlet{mProgressbarBg}{mProgressbarFg!20!black!90}
\definecolor{mTitleseparatorFg}{HTML}{A6DA95}
\definecolor{mStandoutFg}{HTML}{4C4F69}
\definecolor{mStandoutBg}{HTML}{CCD0DA}
\colorlet{mFootnoteFg}{mNormaltextFg!90}
\moloch@apply@semantic@colors
}%
% Apply current variant after registering both
\moloch@apply@current@variant
}E.1.31 New Color System
The color system provides a unified interface for theme selection, variant switching, and granular color customization. It uses pgfkeys to organize options into a /moloch/colors/ namespace.
The system supports three layers of customization:
Theme presets (default, tomorrow, highcontrast)
Variant switching (light/dark)
Per-variant color overrides for individual elements
All customizations are preserved when switching between variants, allowing users to set up colors once and then freely toggle between light and dark modes without losing their customizations.
E.1.32 Color theme and variant options
The main pgfkeys tree defines theme selection, variant switching, and the storage system for user customizations. Storage keys are defined first to declare the macros, then initialized to empty, and finally the actual color setting commands reference these storage macros.
The storage system uses a convention: for each customizable color, there are separate storage macros for light and dark variants named \moloch@store@<variant>@<color>@<property>. For example: \moloch@store@light@progressbar@fg stores the light variant’s progress bar foreground color.
\pgfkeys{
/moloch/colors/.cd,
theme/.is choice,
theme/default/.code=\moloch@colortheme@default,
theme/tomorrow/.code=\moloch@colortheme@tomorrow,
theme/highcontrast/.code=\moloch@colortheme@highcontrast,
theme/paper/.code=\moloch@colortheme@paper,
theme/catppuccin/.code=\moloch@colortheme@catppuccin,
variant/.is choice,
variant/light/.code={%
\moloch@variant@darkfalse
\moloch@colors@light
},
variant/dark/.code={%
\moloch@variant@darktrue
\moloch@colors@dark
},
% Storage keys - store in macros
% These define the storage macros that will hold user customizations
store/light/alerted text/.store in=\moloch@store@light@alerted@text,
store/dark/alerted text/.store in=\moloch@store@dark@alerted@text,
store/light/frametitle fg/.store in=\moloch@store@light@frametitle@fg,
store/dark/frametitle fg/.store in=\moloch@store@dark@frametitle@fg,
store/light/frametitle bg/.store in=\moloch@store@light@frametitle@bg,
store/dark/frametitle bg/.store in=\moloch@store@dark@frametitle@bg,
store/light/example text/.store in=\moloch@store@light@example@text,
store/dark/example text/.store in=\moloch@store@dark@example@text,
store/light/progressbar fg/.store in=\moloch@store@light@progressbar@fg,
store/dark/progressbar fg/.store in=\moloch@store@dark@progressbar@fg,
store/light/progressbar bg/.store in=\moloch@store@light@progressbar@bg,
store/dark/progressbar bg/.store in=\moloch@store@dark@progressbar@bg,
store/light/standout fg/.store in=\moloch@store@light@standout@fg,
store/dark/standout fg/.store in=\moloch@store@dark@standout@fg,
store/light/standout bg/.store in=\moloch@store@light@standout@bg,
store/dark/standout bg/.store in=\moloch@store@dark@standout@bg,
store/light/normal text fg/.store in=\moloch@store@light@normal@text@fg,
store/dark/normal text fg/.store in=\moloch@store@dark@normal@text@fg,
store/light/normal text bg/.store in=\moloch@store@light@normal@text@bg,
store/dark/normal text bg/.store in=\moloch@store@dark@normal@text@bg,
% Initialize storage macros as empty
% This prevents errors when checking if macros are set
store/light/alerted text=,
store/dark/alerted text=,
store/light/frametitle fg=,
store/dark/frametitle fg=,
store/light/frametitle bg=,
store/dark/frametitle bg=,
store/light/example text=,
store/dark/example text=,
store/light/progressbar fg=,
store/dark/progressbar fg=,
store/light/progressbar bg=,
store/dark/progressbar bg=,
store/light/standout fg=,
store/dark/standout fg=,
store/light/standout bg=,
store/dark/standout bg=,
store/light/normal text fg=,
store/dark/normal text fg=,
store/light/normal text bg=,
store/dark/normal text bg=,
% Color setting commands
% Each color has three variants:
% 1. Variant-agnostic: sets current variant + stores for current
% 2. light/<color>: sets if in light mode, always stores for light
% 3. dark/<color>: sets if in dark mode, always stores for dark
progressbar fg/.code={%
\setbeamercolor{progress bar}{fg=#1}%
\moloch@setup@progressbar@parents
\ifmoloch@variant@dark
\pgfkeys{/moloch/colors/store/dark/progressbar fg=#1}%
\else
\pgfkeys{/moloch/colors/store/light/progressbar fg=#1}%
\fi
},
light/progressbar fg/.code={%
\pgfkeys{/moloch/colors/store/light/progressbar fg=#1}%
\ifmoloch@variant@dark\else
\setbeamercolor{progress bar}{fg=#1}%
\moloch@setup@progressbar@parents
\fi
},
dark/progressbar fg/.code={%
\pgfkeys{/moloch/colors/store/dark/progressbar fg=#1}%
\ifmoloch@variant@dark
\setbeamercolor{progress bar}{fg=#1}%
\moloch@setup@progressbar@parents
\fi
},
progressbar bg/.code={%
\setbeamercolor{progress bar}{bg=#1}%
\moloch@setup@progressbar@parents
\ifmoloch@variant@dark
\pgfkeys{/moloch/colors/store/dark/progressbar bg=#1}%
\else
\pgfkeys{/moloch/colors/store/light/progressbar bg=#1}%
\fi
},
light/progressbar bg/.code={%
\pgfkeys{/moloch/colors/store/light/progressbar bg=#1}%
\ifmoloch@variant@dark\else
\setbeamercolor{progress bar}{bg=#1}%
\moloch@setup@progressbar@parents
\fi
},
dark/progressbar bg/.code={%
\pgfkeys{/moloch/colors/store/dark/progressbar bg=#1}%
\ifmoloch@variant@dark
\setbeamercolor{progress bar}{bg=#1}%
\moloch@setup@progressbar@parents
\fi
},
normal text fg/.code={%
\setbeamercolor{normal text}{fg=#1}%
\moloch@setup@text@colors
\moloch@setup@block@colors
\ifmoloch@variant@dark
\pgfkeys{/moloch/colors/store/dark/normal text fg=#1}%
\else
\pgfkeys{/moloch/colors/store/light/normal text fg=#1}%
\fi
},
light/normal text fg/.code={%
\pgfkeys{/moloch/colors/store/light/normal text fg=#1}%
\ifmoloch@variant@dark\else
\setbeamercolor{normal text}{fg=#1}%
\moloch@setup@text@colors
\moloch@setup@block@colors
\fi
},
dark/normal text fg/.code={%
\pgfkeys{/moloch/colors/store/dark/normal text fg=#1}%
\ifmoloch@variant@dark
\setbeamercolor{normal text}{fg=#1}%
\moloch@setup@text@colors
\moloch@setup@block@colors
\fi
},
normal text bg/.code={%
\setbeamercolor{normal text}{bg=#1}%
\ifmoloch@variant@dark
\pgfkeys{/moloch/colors/store/dark/normal text bg=#1}%
\else
\pgfkeys{/moloch/colors/store/light/normal text bg=#1}%
\fi
},
light/normal text bg/.code={%
\pgfkeys{/moloch/colors/store/light/normal text bg=#1}%
\ifmoloch@variant@dark\else
\setbeamercolor{normal text}{bg=#1}%
\fi
},
dark/normal text bg/.code={%
\pgfkeys{/moloch/colors/store/dark/normal text bg=#1}%
\ifmoloch@variant@dark
\setbeamercolor{normal text}{bg=#1}%
\fi
},
alerted text/.code={%
\setbeamercolor{alerted text}{fg=#1}%
\setbeamercolor{block title alerted}{fg=#1}%
\ifmoloch@variant@dark
\pgfkeys{/moloch/colors/store/dark/alerted text=#1}%
\else
\pgfkeys{/moloch/colors/store/light/alerted text=#1}%
\fi
},
light/alerted text/.code={%
\pgfkeys{/moloch/colors/store/light/alerted text=#1}%
\ifmoloch@variant@dark\else
\setbeamercolor{alerted text}{fg=#1}%
\setbeamercolor{block title alerted}{fg=#1}%
\fi
},
dark/alerted text/.code={%
\pgfkeys{/moloch/colors/store/dark/alerted text=#1}%
\ifmoloch@variant@dark
\setbeamercolor{alerted text}{fg=#1}%
\setbeamercolor{block title alerted}{fg=#1}%
\fi
},
example text/.code={%
\setbeamercolor{example text}{fg=#1}%
\setbeamercolor{block title example}{fg=#1}%
\ifmoloch@variant@dark
\pgfkeys{/moloch/colors/store/dark/example text=#1}%
\else
\pgfkeys{/moloch/colors/store/light/example text=#1}%
\fi
},
light/example text/.code={%
\pgfkeys{/moloch/colors/store/light/example text=#1}%
\ifmoloch@variant@dark\else
\setbeamercolor{example text}{fg=#1}%
\setbeamercolor{block title example}{fg=#1}%
\fi
},
dark/example text/.code={%
\pgfkeys{/moloch/colors/store/dark/example text=#1}%
\ifmoloch@variant@dark
\setbeamercolor{example text}{fg=#1}%
\setbeamercolor{block title example}{fg=#1}%
\fi
},
frametitle fg/.code={%
\setbeamercolor{frametitle}{fg=#1}%
\ifmoloch@variant@dark
\pgfkeys{/moloch/colors/store/dark/frametitle fg=#1}%
\else
\pgfkeys{/moloch/colors/store/light/frametitle fg=#1}%
\fi
},
frametitle bg/.code={%
\setbeamercolor{frametitle}{bg=#1}%
\ifmoloch@variant@dark
\pgfkeys{/moloch/colors/store/dark/frametitle bg=#1}%
\else
\pgfkeys{/moloch/colors/store/light/frametitle bg=#1}%
\fi
},
light/frametitle fg/.code={%
\pgfkeys{/moloch/colors/store/light/frametitle fg=#1}%
\ifmoloch@variant@dark\else
\setbeamercolor{frametitle}{fg=#1}%
\fi
},
dark/frametitle fg/.code={%
\pgfkeys{/moloch/colors/store/dark/frametitle fg=#1}%
\ifmoloch@variant@dark
\setbeamercolor{frametitle}{fg=#1}%
\fi
},
light/frametitle bg/.code={%
\pgfkeys{/moloch/colors/store/light/frametitle bg=#1}%
\ifmoloch@variant@dark\else
\setbeamercolor{frametitle}{bg=#1}%
\fi
},
dark/frametitle bg/.code={%
\pgfkeys{/moloch/colors/store/dark/frametitle bg=#1}%
\ifmoloch@variant@dark
\setbeamercolor{frametitle}{bg=#1}%
\fi
},
standout fg/.code={%
\setbeamercolor{standout}{fg=#1}%
},
light/standout fg/.code={%
\pgfkeys{/moloch/colors/store/light/standout fg=#1}%
\ifmoloch@variant@dark\else
\setbeamercolor{standout}{fg=#1}%
\fi
},
dark/standout fg/.code={%
\pgfkeys{/moloch/colors/store/dark/standout fg=#1}%
\ifmoloch@variant@dark
\setbeamercolor{standout}{fg=#1}%
\fi
},
standout bg/.code={%
\setbeamercolor{standout}{bg=#1}%
},
light/standout bg/.code={%
\pgfkeys{/moloch/colors/store/light/standout bg=#1}%
\ifmoloch@variant@dark\else
\setbeamercolor{standout}{bg=#1}%
\fi
},
dark/standout bg/.code={%
\pgfkeys{/moloch/colors/store/dark/standout bg=#1}%
\ifmoloch@variant@dark
\setbeamercolor{standout}{bg=#1}%
\fi
},
}E.1.33 \molochcolors
User-facing command for color customization.
\newcommand{\molochcolors}[1]{\pgfkeys{/moloch/colors/.cd,#1}}The Moloch 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.
\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
}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{verbatim}
\setbeamercolor{bibliography entry author}{fg=, bg=}
\setbeamercolor{bibliography entry title}{fg=, bg=}
\setbeamercolor{bibliography entry location}{fg=, bg=}
\setbeamercolor{bibliography entry note}{fg=, bg=}E.1.34 Process Package Options
\moloch@colortheme@default
\moloch@color@setdefaults
\ProcessPgfPackageOptions{/moloch/color}\mode<all>