![Latex ビーマー: テーマで使用される色を取得する](https://rvso.com/image/390940/Latex%20%E3%83%93%E3%83%BC%E3%83%9E%E3%83%BC%3A%20%E3%83%86%E3%83%BC%E3%83%9E%E3%81%A7%E4%BD%BF%E7%94%A8%E3%81%95%E3%82%8C%E3%82%8B%E8%89%B2%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B.png)
Beamer テーマとカラー テーマで定義された色を再利用したいと思います。
たとえば、次のように使用します。
\usetheme{Berkeley}
\usecolortheme{beetle}
サイドバーで使用されている色を確認して、再度再利用するにはどうすればよいでしょうか?
私はすでにこれを見つけました:
{\usebeamercolor[fg]{structure} text}
これは本当に良いのですが、テキストに色を使用するだけでなく、たとえばタイトルの色として定義できるようにしたいと思います。
答え1
あなたが探しているのは、おそらくこれです:
CTAN パッケージそして Github プロジェクト ビーマー
そしてあなたの場合(ビートルテーマ):
ここで、すべての色は次のように定義されます。
% 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>
これが役に立つことを願っています。