1
0
mirror of https://github.com/matze/mtheme.git synced 2024-06-30 08:00:56 +02:00
metropolis_theme/beamercolorthememetropolis.dtx
Ross Churchley e182f5e8a4 Remove \CharacterTables
\CharacterTable checks against text encoding errors, which was more common when files were typically distributed over email. Now package distribution is done with better tools and modern packages can safely omit \CharacterTable.

http://tex.stackexchange.com/a/42604
2015-06-16 08:34:00 -07:00

195 lines
4.2 KiB
TeX

% \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/).
% ------------------------------------------------------------------------- \fi
% \iffalse
%<*driver>
\ProvidesFile{beamercolorthememetropolis.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{beamercolorthememetropolis}
%<*package>
[2015/06/12 1.0.0 A Modern Beamer Color Theme]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{beamercolorthememetropolis}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
\DocInput{beamercolorthememetropolis.dtx}
\PrintChanges
\PrintIndex
\end{document}
%</driver>
% \fi
%
% \CheckSum{0}
%
% \changes{1.0.0}{2015/06/12}{Initial Stable Release.}
%
% \DoNotIndex{\newcommand,\newenvironment}
%
%
% \StopEventually{}
%
% \subsection{Color Theme}
%
% \iffalse
%<*package>
% \fi
%
% Options
%
% \begin{macrocode}
\newif\if@beamer@metropolis@blockbg
\@beamer@metropolis@blockbgfalse
\DeclareOptionBeamer{blockbg}{
\@beamer@metropolis@blockbgtrue
}
% \end{macrocode}
%
% darkcolors
%
% \begin{macrocode}
\newif\if@beamer@metropolis@darkcolors
\@beamer@metropolis@darkcolorsfalse
\DeclareOptionBeamer{darkcolors}{
\@beamer@metropolis@darkcolorstrue
}
% \end{macrocode}
%
% Unknown option error handling
%
% \begin{macrocode}
\DeclareOptionBeamer*{%
\PackageWarning{beamercolorthememetropolis}{Unknown option `\CurrentOption'}%
}
\ProcessOptionsBeamer
% \end{macrocode}
%
% Colors
%
% \begin{macrocode}
\definecolor{mDarkBrown}{HTML}{604c38}
\definecolor{mDarkTeal}{HTML}{23373b}
\definecolor{mLightBrown}{HTML}{EB811B}
\definecolor{mLightGreen}{HTML}{14B03D}
% \end{macrocode}
%
% Base Colors
%
% \begin{macrocode}
\if@beamer@metropolis@darkcolors
\setbeamercolor{normal text}{%
fg=black!2,
bg=mDarkTeal
}
\else
\setbeamercolor{normal text}{%
fg=mDarkTeal,
bg=black!2
}
\fi
\setbeamercolor{alerted text}{%
fg=mLightBrown
}
\setbeamercolor{example text}{%
fg=mLightGreen
}
% \end{macrocode}
%
% Derived Colors
%
% \begin{macrocode}
\setbeamercolor{titlelike}{use=normal text, parent=normal text}
\setbeamercolor{structure}{%
fg=normal text.fg
}
% \end{macrocode}
%
% Frame titles and plain slides
%
% \begin{macrocode}
\setbeamercolor{frametitle}{use=palette primary, parent=palette primary}
% \end{macrocode}
%
% The “primary” palette should be used for the most important navigational
% elements, and possibly of other elements.
% The metropolis color theme uses it for frame titles and slides.
%
% \begin{macrocode}
\setbeamercolor{palette primary}{%
use=normal text,
fg=normal text.bg,
bg=normal text.fg
}
% \end{macrocode}
%
% Progress bar and title separator
%
% \begin{macrocode}
\setbeamercolor{title separator}{use=progress bar, parent=progress bar}
\setbeamercolor{progress bar}{%
use=alerted text,
fg=alerted text.fg,
bg=normal text.bg!50!fg
}
% \end{macrocode}
%
% Blocks
%
% \begin{macrocode}
\if@beamer@metropolis@blockbg
\setbeamercolor{block title}{%
use=normal text,
fg=normal text.fg,
bg=normal text.bg!80!fg
}
\else
\setbeamercolor{block title}{use=normal text, parent=normal text}
\fi
\setbeamercolor{block title alerted}{%
use={block title, alerted text},
bg=block title.bg,
fg=alerted text.fg
}
\setbeamercolor{block title example}{%
use={block title, example text},
bg=block title.bg,
fg=example text.fg
}
\setbeamercolor{block body alerted}{use=block body, parent=block body}
\setbeamercolor{block body example}{use=block body, parent=block body}
\setbeamercolor{block body}{
use={block title, normal text},
bg=block title.bg!50!normal text.bg
}
% \end{macrocode}
%
% Footnotes
%
% \begin{macrocode}
\setbeamercolor{footnote}{fg=normal text.fg!90}
\setbeamercolor{footnote mark}{fg=.}
\mode<all>
% \end{macrocode}
%
% \iffalse
%</package>
% \fi
%
% \Finale
\endinput