From 9adb594f2de675771ed643e6a9049ef1f681d9f0 Mon Sep 17 00:00:00 2001 From: Benjamin Weiss Date: Thu, 11 Jun 2015 10:53:20 +0200 Subject: [PATCH 1/2] added invertcolors option --- beamercolorthememetropolis.sty | 27 +++++++++++++++++++++++---- beamerthemem.sty | 7 +++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/beamercolorthememetropolis.sty b/beamercolorthememetropolis.sty index 31d3df8..54e44c0 100644 --- a/beamercolorthememetropolis.sty +++ b/beamercolorthememetropolis.sty @@ -19,6 +19,18 @@ \@beamer@metropolis@blockbgtrue } +% Options +% ======= + +% Option: invertcolors +% makes the background dark and the foreground light + +\newif\if@beamer@metropolis@invertcolors +\@beamer@metropolis@invertcolorsfalse +\DeclareOptionBeamer{invertcolors}{ + \@beamer@metropolis@invertcolorstrue +} + % Option: ... \DeclareOptionBeamer*{% @@ -57,10 +69,17 @@ % in your preamble. % -\setbeamercolor{normal text}{% - fg=mDarkTeal, - bg=black!2 -} +\if@beamer@metropolis@invertcolors + \setbeamercolor{normal text}{% + fg=black!2, + bg=mDarkTeal + } +\else + \setbeamercolor{normal text}{% + fg=mDarkTeal, + bg=black!2 + } +\fi \setbeamercolor{alerted text}{% fg=mLightBrown diff --git a/beamerthemem.sty b/beamerthemem.sty index 65cde91..c8e1341 100644 --- a/beamerthemem.sty +++ b/beamerthemem.sty @@ -81,6 +81,13 @@ \PassOptionsToPackage{blockbg}{beamercolorthememetropolis}% } +% Option: invertcolors +% makes the background dark and the foreground light + +\DeclareOptionBeamer{invertcolors}{ + \PassOptionsToPackage{invertcolors}{beamercolorthememetropolis}% +} + % Option: ... \DeclareOptionBeamer*{ From dd483ff5fcd89713f174071509475dc579816f3a Mon Sep 17 00:00:00 2001 From: Benjamin Weiss Date: Thu, 11 Jun 2015 22:25:27 +0200 Subject: [PATCH 2/2] renamed invertcolors to dark colors and added info in README.md --- README.md | 1 + beamercolorthememetropolis.sty | 12 ++++++------ beamerthemem.sty | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index bab2665..955f1fe 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ the slides, i.e. in following format: #current/#total. By default, just current page number is printed. * Option `noslidenumbers` omits slide numbers entirely. +* Option `darkcolors` makes the background dark and the foreground light. #### Color customization diff --git a/beamercolorthememetropolis.sty b/beamercolorthememetropolis.sty index 54e44c0..a890b34 100644 --- a/beamercolorthememetropolis.sty +++ b/beamercolorthememetropolis.sty @@ -22,13 +22,13 @@ % Options % ======= -% Option: invertcolors +% Option: darkcolors % makes the background dark and the foreground light -\newif\if@beamer@metropolis@invertcolors -\@beamer@metropolis@invertcolorsfalse -\DeclareOptionBeamer{invertcolors}{ - \@beamer@metropolis@invertcolorstrue +\newif\if@beamer@metropolis@darkcolors +\@beamer@metropolis@darkcolorsfalse +\DeclareOptionBeamer{darkcolors}{ + \@beamer@metropolis@darkcolorstrue } % Option: ... @@ -69,7 +69,7 @@ % in your preamble. % -\if@beamer@metropolis@invertcolors +\if@beamer@metropolis@darkcolors \setbeamercolor{normal text}{% fg=black!2, bg=mDarkTeal diff --git a/beamerthemem.sty b/beamerthemem.sty index c8e1341..693eecf 100644 --- a/beamerthemem.sty +++ b/beamerthemem.sty @@ -81,11 +81,11 @@ \PassOptionsToPackage{blockbg}{beamercolorthememetropolis}% } -% Option: invertcolors +% Option: darkcolors % makes the background dark and the foreground light -\DeclareOptionBeamer{invertcolors}{ - \PassOptionsToPackage{invertcolors}{beamercolorthememetropolis}% +\DeclareOptionBeamer{darkcolors}{ + \PassOptionsToPackage{darkcolors}{beamercolorthememetropolis}% } % Option: ...