Beamer The Metropolis differenziare colori sfondo titolo/testo

  • Creatore
    Topic
  • #112636
    Up
    0
    Down
    ::


    Buongiorno a tutti/e,

    sto facendo una presentazione con il template “the metropolis” di beamer. In questo template il titolo delle slide è bianco su uno sfondo colorato. Il colore di questo sfondo è lo stesso del testo delle slide.

    Ora, il mio problema è il seguente: vorrei cambiare il colore dello sfondo del titolo ma non del testo, che mi piace così com’è. Ho fatto diverse prove definendo un nuovo colore, ma riesco solo a cambiarli entrambi 🙁 Qualcuno/a può aiutarmi, per favore? Copio sotto il codice del foglio di stile relativo ai colori (non riesco ad allegarlo perché l’estensione non è tra quelle supportate).

    Grazie in anticipo!

    Martina
    `
    %%
    %% This is file `beamercolorthememetropolis.sty',
    %% generated with the docstrip utility.
    %%
    %% The original source files were:
    %%
    %% beamercolorthememetropolis.dtx (with options: `package')
    %% —————————————————————————
    %% 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/).
    %% —————————————————————————
    \NeedsTeXFormat{LaTeX2e}
    \ProvidesPackage{beamercolorthememetropolis}[2017/01/23 Metropolis color theme]
    \RequirePackage{pgfopts}
    \pgfkeys{
    /metropolis/color/block/.cd,
    .is choice,
    transparent/.code=\metropolis@block@transparent,
    fill/.code=\metropolis@block@fill,
    }
    \pgfkeys{
    /metropolis/color/background/.cd,
    .is choice,
    dark/.code=\metropolis@colors@dark,
    light/.code=\metropolis@colors@light,
    }
    \newcommand{\metropolis@color@setdefaults}{
    \pgfkeys{/metropolis/color/.cd,
    background=light,
    block=transparent,
    }
    }
    \definecolor{mDarkBrown}{HTML}{604c38}
    \definecolor{mDarkTeal}{HTML}{23373b}
    \definecolor{mLightBrown}{HTML}{EB811B}
    \definecolor{mLightGreen}{HTML}{14B03D}
    \newcommand{\metropolis@colors@dark}{
    \setbeamercolor{normal text}{%
    fg=black!2,
    bg=mDarkTeal
    }
    \usebeamercolor[fg]{normal text}
    }
    \newcommand{\metropolis@colors@light}{
    \setbeamercolor{normal text}{%
    fg=mDarkTeal,
    bg=black!2
    }
    }
    \setbeamercolor{alerted text}{%
    fg=mLightBrown
    }
    \setbeamercolor{example text}{%
    fg=mLightGreen
    }
    \setbeamercolor{titlelike}{use=normal text, parent=normal text}
    \setbeamercolor{author}{use=normal text, parent=normal text}
    \setbeamercolor{date}{use=normal text, parent=normal text}
    \setbeamercolor{institute}{use=normal text, parent=normal text}
    \setbeamercolor{structure}{use=normal text, fg=normal text.fg}
    \setbeamercolor{palette primary}{%
    use=normal text,
    fg=normal text.bg,
    bg=normal text.fg
    }
    \setbeamercolor{frametitle}{%
    use=palette primary,
    parent=palette primary
    }
    \setbeamercolor{progress bar}{%
    use=alerted text,
    fg=alerted text.fg,
    bg=alerted text.fg!50!black!30
    }
    \setbeamercolor{title separator}{
    use=progress bar,
    parent=progress bar
    }
    \setbeamercolor{progress bar in head/foot}{%
    use=progress bar,
    parent=progress bar
    }
    \setbeamercolor{progress bar in section page}{
    use=progress bar,
    parent=progress bar
    }
    \newcommand{\metropolis@block@transparent}{
    \setbeamercolor{block title}{%
    use=normal text,
    fg=normal text.fg,
    bg=
    }
    \setbeamercolor{block body}{
    bg=
    }
    }
    \newcommand{\metropolis@block@fill}{
    \setbeamercolor{block title}{%
    use=normal text,
    fg=normal text.fg,
    bg=normal text.bg!80!fg
    }
    \setbeamercolor{block body}{
    use={block title, normal text},
    bg=block title.bg!50!normal text.bg
    }
    }
    \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{footnote}{fg=normal text.fg!90}
    \setbeamercolor{footnote mark}{fg=.}
    \setbeamercolor{bibliography entry author}{fg=, bg=}
    \setbeamercolor{bibliography entry title}{fg=, bg=}
    \setbeamercolor{bibliography entry location}{fg=, bg=}
    \setbeamercolor{bibliography entry note}{fg=, bg=}
    \metropolis@color@setdefaults
    \ProcessPgfPackageOptions{/metropolis/color}
    \mode
    \endinput
    %%
    %% End of file `beamercolorthememetropolis.sty'.`

  • Devi essere connesso per rispondere a questo topic.

Go to top