| 1 |
% \iffalse meta-comment ------------------------------------------------------- |
| 2 |
% Copyright (C) 2021 Thomas Lambert <[email protected]> |
| 3 |
% Other contributors to this theme are listed here: |
| 4 |
% https://gitlab.com/thlamb/beamertheme-trigon/-/graphs/master |
| 5 |
% |
| 6 |
% The original template was heavily inspired by Metropolis from Matthias |
| 7 |
% Vogelgesang. |
| 8 |
% |
| 9 |
% License CC-BY-SA 4.0 |
| 10 |
% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 |
| 11 |
% International License (https://creativecommons.org/licenses/by-sa/4.0/) |
| 12 |
% ------------------------------------------------------------------------- \fi |
| 13 |
% \iffalse |
| 14 |
%<*package> |
| 15 |
\NeedsTeXFormat{LaTeX2e} |
| 16 |
\ProvidesPackage{beamercolorthemetrigon}[2023/02/20 v0.7.0 Trigon color theme] |
| 17 |
%</package> |
| 18 |
% \fi |
| 19 |
% \CheckSum{0} |
| 20 |
% \StopEventually{} |
| 21 |
% \iffalse |
| 22 |
%<*package> |
| 23 |
% ------------------------------------------------------------------------- \fi |
| 24 |
% |
| 25 |
% \subsection{\themename color theme} |
| 26 |
% |
| 27 |
% A |beamer| color theme sets the colors used for the different elements of the |
| 28 |
% document. |
| 29 |
% |
| 30 |
% \subsubsection{Package dependencies} |
| 31 |
% \begin{macrocode} |
| 32 |
\RequirePackage{pgfopts} |
| 33 |
% \end{macrocode} |
| 34 |
% |
| 35 |
% \subsubsection{Options} |
| 36 |
% |
| 37 |
% \begin{macro}{colors} |
| 38 |
% Provides the option to have a dark background and light foreground instead |
| 39 |
% of the reverse. |
| 40 |
% \begin{macrocode} |
| 41 |
\pgfkeys{ |
| 42 |
/trigon/color/background/.cd, |
| 43 |
.is choice, |
| 44 |
dark/.code=\trigon@colors@dark, |
| 45 |
light/.code=\trigon@colors@light |
| 46 |
} |
| 47 |
% \end{macrocode} |
| 48 |
% \end{macro} |
| 49 |
% |
| 50 |
% \begin{macro}{headingcolor} |
| 51 |
% Select the color to use for all headings (title, section, frame, etc.). |
| 52 |
% \begin{macrocode} |
| 53 |
\def\headcol{tDefaulttxt} |
| 54 |
\pgfkeys{ |
| 55 |
/trigon/color/headingcolor/.cd, |
| 56 |
.is choice, |
| 57 |
default/.code=\def\headcol{tTxt}, |
| 58 |
theme/.code=\def\headcol{tPrim} |
| 59 |
} |
| 60 |
% \end{macrocode} |
| 61 |
% \end{macro} |
| 62 |
% |
| 63 |
% \begin{macro}{textcolor} |
| 64 |
% Select the color to use for all headings (title, section, frame, etc.). |
| 65 |
% \begin{macrocode} |
| 66 |
\def\txtcol{black} |
| 67 |
\pgfkeys{ |
| 68 |
/trigon/color/textcolor/.cd, |
| 69 |
.is choice, |
| 70 |
default/.code=\def\txtcol{tTxt}, |
| 71 |
theme/.code=\def\txtcol{tPrim!50!tTxt} |
| 72 |
} |
| 73 |
% \end{macrocode} |
| 74 |
% \end{macro} |
| 75 |
% |
| 76 |
% \begin{macro}{block} |
| 77 |
% Optionally removes the light grey background to block environments like |
| 78 |
% |theorem| and |example|. |
| 79 |
% \begin{macrocode} |
| 80 |
\pgfkeys{ |
| 81 |
/trigon/color/block/.cd, |
| 82 |
.is choice, |
| 83 |
transparent/.code=\trigon@block@transparent, |
| 84 |
fill/.code=\trigon@block@fill |
| 85 |
} |
| 86 |
% |
| 87 |
% \begin{macro}{\trigon@color@setdefaults} |
| 88 |
% Sets default values for color theme options. |
| 89 |
% \begin{macrocode} |
| 90 |
\newcommand{\trigon@color@setdefaults}{ |
| 91 |
\pgfkeys{/trigon/color/.cd, |
| 92 |
background=light, |
| 93 |
block=fill, |
| 94 |
headingcolor=default, |
| 95 |
textcolor=default |
| 96 |
} |
| 97 |
} |
| 98 |
% \end{macrocode} |
| 99 |
% \end{macro} |
| 100 |
% |
| 101 |
% \subsubsection{Base colors} |
| 102 |
% |
| 103 |
% \begin{macrocode} |
| 104 |
\definecolor{tGreenBlue}{HTML}{00707F} |
| 105 |
\definecolor{tGreenBlueLight}{HTML}{5FA4B0} |
| 106 |
\definecolor{tOrange}{HTML}{F07F3C} |
| 107 |
\definecolor{tYellowOrange}{HTML}{F8AA00} |
| 108 |
\definecolor{tBeigePale}{HTML}{E6E6E1} |
| 109 |
\definecolor{tBeige}{HTML}{C6C0B4} |
| 110 |
\definecolor{tDarkBg}{HTML}{232931} |
| 111 |
\definecolor{tDarkFg}{HTML}{EEEEEE} |
| 112 |
\definecolor{tLightBg}{HTML}{FFFFFF} |
| 113 |
% \end{macrocode} |
| 114 |
% |
| 115 |
% \subsubsection{Derived elements} |
| 116 |
% |
| 117 |
% All the elements are set using the base colors defined here above. |
| 118 |
% \begin{macrocode} |
| 119 |
\newcommand{\trigon@colors@dark}{ |
| 120 |
\colorlet{tPrim}{tGreenBlueLight} |
| 121 |
\colorlet{tSec}{tGreenBlue} |
| 122 |
\colorlet{tAccent}{tYellowOrange} |
| 123 |
\colorlet{tTxt}{tDarkFg} |
| 124 |
\colorlet{tBg}{tDarkBg} |
| 125 |
\colorlet{tGreyBg}{tGrey!7!tBg} |
| 126 |
} |
| 127 |
\newcommand{\trigon@colors@light}{ |
| 128 |
\colorlet{tPrim}{tGreenBlue} |
| 129 |
\colorlet{tSec}{tGreenBlue} |
| 130 |
\colorlet{tAccent}{tOrange} |
| 131 |
\colorlet{tTxt}{black} |
| 132 |
\colorlet{tBg}{tLightBg} |
| 133 |
\colorlet{tGreyBg}{tGrey!25!tBg} |
| 134 |
} |
| 135 |
\colorlet{tGrey}{tBeige} |
| 136 |
\colorlet{tTheme}{tGreenBlue} |
| 137 |
\setbeamercolor{background canvas}{bg=tBg} |
| 138 |
\setbeamercolor{normal text}{fg=\txtcol, bg=tBg} |
| 139 |
\setbeamercolor{example text}{fg=tPrim} |
| 140 |
\setbeamercolor{alerted text}{fg=tAccent} |
| 141 |
|
| 142 |
\setbeamercolor{title}{fg=\headcol, bg= , parent=normal text} |
| 143 |
\setbeamercolor{titlelike}{use=title, parent=title} |
| 144 |
\setbeamercolor{author}{use=normal text, bg= , parent=normal text} |
| 145 |
\setbeamercolor{date}{use=normal text, bg= , parent=normal text} |
| 146 |
\setbeamercolor{institute}{use=normal text, parent=normal text} |
| 147 |
\setbeamercolor{structure}{use=normal text, fg=normal text.fg} |
| 148 |
|
| 149 |
\setbeamercolor{palette primary}{use=titlelike, parent=titlelike} |
| 150 |
\setbeamercolor{frametitle}{use=titlelike, parent=titlelike} |
| 151 |
% \end{macrocode} |
| 152 |
% |
| 153 |
% |
| 154 |
% Block environments such as |theorem| and |example| have a grey-tinted background |
| 155 |
% color by default. The option |block=transparent| removes the background color. |
| 156 |
% \begin{macrocode} |
| 157 |
\newcommand{\trigon@block@transparent}{ |
| 158 |
\setbeamercolor{block title}{% |
| 159 |
use=normal text, |
| 160 |
fg=normal text.fg, |
| 161 |
bg=normal text.bg!96!fg |
| 162 |
} |
| 163 |
\setbeamercolor{block body}{ |
| 164 |
use={block title, normal text}, |
| 165 |
bg=block title.bg!35!normal text.bg |
| 166 |
} |
| 167 |
} |
| 168 |
\newcommand{\trigon@block@fill}{ |
| 169 |
\setbeamercolor{block title}{% |
| 170 |
use=normal text, |
| 171 |
fg=normal text.fg, |
| 172 |
bg=normal text.bg!80!normal text.fg |
| 173 |
} |
| 174 |
\setbeamercolor{block body}{ |
| 175 |
use={block title, normal text}, |
| 176 |
bg=block title.bg!50!normal text.bg |
| 177 |
} |
| 178 |
} |
| 179 |
|
| 180 |
\setbeamercolor{block title alerted}{% |
| 181 |
use={block title, alerted text}, |
| 182 |
bg=block title.bg, |
| 183 |
fg=alerted text.fg |
| 184 |
} |
| 185 |
\setbeamercolor{block title example}{% |
| 186 |
use={block title, example text}, |
| 187 |
bg=block title.bg, |
| 188 |
fg=example text.fg |
| 189 |
} |
| 190 |
\setbeamercolor{block body alerted}{use=block body, parent=block body} |
| 191 |
\setbeamercolor{block body example}{use=block body, parent=block body} |
| 192 |
% \end{macrocode} |
| 193 |
% |
| 194 |
% The color of other smaller elements is defined as follows |
| 195 |
% \begin{macrocode} |
| 196 |
\setbeamercolor{footnote}{fg=normal text.fg!90!normal text.bg} |
| 197 |
\setbeamercolor{footnote mark}{fg=.} |
| 198 |
\setbeamercolor{footline}{fg=normal text.fg!50!normal text.bg, parent=normal text} |
| 199 |
\setbeamercolor{caption}{fg=normal text.fg!60!normal text.bg, parent=normal text} |
| 200 |
|
| 201 |
\setbeamercolor{itemize item}{use=example text, parent=example text} |
| 202 |
\setbeamercolor{itemize subitem}{use=itemize item, parent=itemize item} |
| 203 |
\setbeamercolor{itemize subsubitem}{use=itemize item, parent=itemize item} |
| 204 |
\setbeamercolor{enumerate item}{use=example text, parent=example text} |
| 205 |
\setbeamercolor{enumerate subitem}{use=enumerate item, parent=enumerate item} |
| 206 |
\setbeamercolor{enumerate subsubitem}{use=enumerate item, parent=enumerate item} |
| 207 |
\setbeamercolor{description item}{use=example text, parent=example text} |
| 208 |
% \end{macrocode} |
| 209 |
% |
| 210 |
% \subsubsection{Process package options} |
| 211 |
% |
| 212 |
% \begin{macrocode} |
| 213 |
\trigon@color@setdefaults |
| 214 |
\ProcessPgfPackageOptions{/trigon/color} |
| 215 |
% \end{macrocode} |
| 216 |
% |
| 217 |
% \iffalse |
| 218 |
%</package> |
| 219 |
% \fi |
| 220 |
% \Finale |
| 221 |
\endinput |