Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change color of inverted section pages? #400

Open
camayl opened this issue Feb 5, 2024 · 2 comments
Open

How to change color of inverted section pages? #400

camayl opened this issue Feb 5, 2024 · 2 comments

Comments

@camayl
Copy link

camayl commented Feb 5, 2024

I am using the following, to get inverted color section pages:

\AtBeginSection{
  {
    \metroset{background=dark}
    \frame[plain,c,noframenumbering]{\sectionpage}
  }
}

At the sametime I am using a custom color, call it maincolor. maincolor applied to the frame titles, but somehow the inverted section page background is still in dark teal (the original mtheme color). How can I change this?
Thanks!

@kir0ul
Copy link

kir0ul commented Feb 5, 2024

Not sure what you're trying to do with the \AtBeginSection{} command, but I believe you can just use \usetheme[background=dark]{metropolis} to get inverted colors.

You can do something like that to change the original dark teal color:

\documentclass[10pt]{beamer}

\usetheme{metropolis}

\definecolor{maincolor}{HTML}{138a07}
\setbeamercolor{normal text}{%
    % bg=,
    fg=maincolor
}

\begin{document}

\begin{frame}{Metropolis test}
	\begin{itemize}
		\item Test 1
		\item Test 2
	\end{itemize}
\end{frame}

\end{document}

image

The annoying thing is that this color is the same for the background of the title and for the text color inside the slide.

@camayl
Copy link
Author

camayl commented Feb 6, 2024

TL;DR: changing the name of color mDarkTeal to maincolor somehow seems to break my setup.

Thank you so much for your help. Ok I realised what is not working. Let me explain.

So what my snippet (which I found online) does, is give me "inverted" section slides at the beginning of each section, looking like this:
Screenshot 2024-02-06 032124.

Additionally I use:

\setbeamercolor{frametitle}{bg=mDarkTeal}

Which results in the same color for frametitles and for section pages. All good.

HOWEVER, in another beamer document, I actually changed the name mDarkTeal to maincolor (because I am aiming to have an own customize mtheme version where I can easily change the colors), so that I had:

\setbeamercolor{frametitle}{bg=maincolor}

With this setup, somehow the frametitles and the section pages did not have the same color anymore:
Screenshot 2024-02-06 032738

So I guess a simple fix is just to leave the name of the "main" color as mDarkTeal, although I don't quite understand this. But thank you so much for helping me figure this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants