8

In the beamer metropolis package one is capable to highlight text using the \alert{} command in orange. Further it is possible to create a block, where the header is in the same color \begin{alertblock} --- \end{alertblock}.

My question now is, if it is possible to use the color of \begin{exampleblock} --- \end{exampleblock} to highlight text in green?. Either I don't find it using the documentation or it is really not possible. If so, how can I select the color using for example the \usepackage{color} and the respective command \textcolor{}{}?

Here the respective blocks as found on the template on Overleaf: enter image description here

1
  • 1
    You mean something along the line of \setbeamercolor{alerted text}{fg=green!80!black} ?
    – Moriambar
    Apr 17, 2017 at 10:51

2 Answers 2

9

You could just open the beamercolorthememetropolis.sty from your TeX distribution (OS search does it for you).

There you would find something like:

\definecolor{mLightBrown}{HTML}{EB811B}
\definecolor{mLightGreen}{HTML}{14B03D}

and following

\setbeamercolor{example text}{%
  fg=mLightGreen
}

So you could use \textcolor{mLightGreen}{Text}.

example for colors

MWE:

\documentclass{beamer}
\usetheme{metropolis}

\begin{document}
\begin{frame}
    Test
    \begin{exampleblock}{Test}
        ASDF
    \end{exampleblock}
    \textcolor{mLightGreen}{\bfseries Test}\\
    \textcolor{mLightGreen}{Test}
\end{frame}
\end{document}
0
0

if you took about this presentation , you could try to add

\metroset{block=fill}

after using the block like that:

\metroset{block=fill}
\begin{block}{Default}
    Block content.
\end{block}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .