Latex beamer:获取主题中使用的颜色

Latex beamer:获取主题中使用的颜色

我想重新使用由 beamer 主题和颜色主题定义的颜色。

例如,如果我使用:

\usetheme{Berkeley}
\usecolortheme{beetle}

我如何才能知道侧边栏使用了什么颜色,以便可以再次使用它?

我已经发现了这个:

{\usebeamercolor[fg]{structure} text}

这真的很好,但我希望不仅能够将颜色用于文本,还可以将其定义为标题颜色。

答案1

我很确定,你正在寻找的是这个:

CTAN 软件包Github项目Beamer

就你的情况而言(甲壳虫主题):

beamercolorthemebeetle.sty

所有颜色定义如下:

% Copyright 2007 by Till Tantau
% Copyright 2015 by Vedran Mileti\'c, Joseph Wright
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/licenses/LICENSE for more details.

\setbeamercolor*{normal text}{fg=yellow!50!white,bg=blue!50!black}

\DeclareOption{overlystylish}
{
  \def\beamer@cta@do{
    \setbeamertemplate{background canvas}[vertical shading][bottom=black,top=black,middle=blue!50!black]
  }
}
\ProcessOptions

\@ifundefined{beamer@cta@do}{}{\beamer@cta@do}

\mode<presentation>

\setbeamercolor*{example text}{fg=green!65!black}

\setbeamercolor*{structure}{fg=blue!25!white}

\setbeamercolor{palette primary}{use={structure,normal text},fg=structure.fg,bg=normal text.bg!75!black}
\setbeamercolor{palette secondary}{use={structure,normal text},fg=structure.fg,bg=normal text.bg!60!black}
\setbeamercolor{palette tertiary}{use={structure,normal text},fg=structure.fg,bg=normal text.bg!45!black}
\setbeamercolor{palette quaternary}{use={structure,normal text},fg=structure.fg,bg=normal text.bg!30!black}

\setbeamercolor*{block body}{bg=normal text.bg!90!black}
\setbeamercolor*{block body alerted}{bg=normal text.bg!90!black}
\setbeamercolor*{block body example}{bg=normal text.bg!90!black}
\setbeamercolor*{block title}{parent=structure,bg=normal text.bg!75!black}
\setbeamercolor*{block title alerted}{use={normal text,alerted text},fg=alerted text.fg!75!normal text.fg,bg=normal text.bg!75!black}
\setbeamercolor*{block title example}{use={normal text,example text},fg=example text.fg!75!normal text.fg,bg=normal text.bg!75!black}

\setbeamercolor{item projected}{fg=black}

\setbeamercolor*{sidebar}{parent=palette primary}

\setbeamercolor{palette sidebar primary}{use=normal text,fg=normal text.fg}
\setbeamercolor{palette sidebar secondary}{use=structure,fg=structure.fg}
\setbeamercolor{palette sidebar tertiary}{use=normal text,fg=normal text.fg}
\setbeamercolor{palette sidebar quaternary}{use=structure,fg=structure.fg}

\setbeamercolor*{separation line}{}
\setbeamercolor*{fine separation line}{}


\mode
<all>

我希望这有帮助。

相关内容