From 2db8e599a60b17be445e7216f9d625141c90a755 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 29 May 2023 18:44:13 +0200 Subject: [PATCH] Add dark theme from https://tex.stackexchange.com/a/57478 --- README.md | 1 + projektor.sty | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 3cfa37e..e82a406 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,4 @@ Options disponible : - `code` : utilisation de `minted` - `fr` : utilisation de `babel` +- `dark` : thème sombre diff --git a/projektor.sty b/projektor.sty index 1d3b168..4a0204e 100644 --- a/projektor.sty +++ b/projektor.sty @@ -7,6 +7,8 @@ \DeclareOption{code}{\option@codetrue} \newif\ifoption@fr \DeclareOption{fr}{\option@frtrue} +\newif\ifoption@dark +\DeclareOption{dark}{\option@darktrue} \ProcessOptions \ifoption@code @@ -25,6 +27,21 @@ numbering=fraction ]{metropolis} + +\ifoption@dark + % Dark theme + \setbeamercolor{normal text}{fg=white,bg=black!90} + \setbeamercolor{structure}{fg=white} + + \setbeamercolor{alerted text}{fg=red!85!black} + \setbeamercolor{item projected}{use=item,fg=black,bg=item.fg!35} + + \setbeamercolor*{palette primary}{use=structure,fg=structure.fg} + \setbeamercolor*{palette secondary}{use=structure,fg=structure.fg!95!black} + \setbeamercolor*{palette tertiary}{use=structure,fg=structure.fg!90!black} + \setbeamercolor*{palette quaternary}{use=structure,fg=structure.fg!95!black,bg=black!80} +\fi + % Footer \setbeamertemplate{frame footer}{ \insertsection \hfill\hspace{-4em} \insertshorttitle