如何自定义投影机的颜色

如何自定义投影机的颜色

我正在尝试复制以下配色方案beamer,但在这样做时遇到了困难:

在此处输入图片描述

\documentclass[xcolor={dvipsnames}]{beamer}
\usetheme{CambridgeUS}

\setbeamercolor*{structure}{bg=PineGreen!20,fg=PineGreen}

\setbeamercolor*{palette primary}{use=structure,fg=white,bg=structure.fg}
\setbeamercolor*{palette secondary}{use=structure,fg=white,bg=structure.fg!75}
\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black}
\setbeamercolor*{palette quaternary}{fg=white,bg=black}

\setbeamercolor{section in toc}{fg=black,bg=white}
\setbeamercolor{alerted text}{use=structure,fg=structure.fg!50!black!80!black}

\setbeamercolor{titlelike}{parent=palette primary,fg=structure.fg!50!black}
\setbeamercolor{frametitle}{bg=gray!10!white,fg=PineGreen}

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

\author{The Author}
\title{Work Culture}
\begin{document}
\begin{frame}
\titlepage
\end{frame}

\begin{frame}
\frametitle{Test title}
\framesubtitle{Test subtitle}
test text
\end{frame}

\end{document}

答案1

图片中所示的颜色方案基本上由某些色调的蓝色和黑色组成,因此您可以PineGreen在代码中用适当的蓝色色调替换;例如:

\definecolor{myblue}{RGB}{33,84,157}

举个小例子:

\documentclass[xcolor={dvipsnames}]{beamer}
\usetheme{CambridgeUS}

\definecolor{myblue}{RGB}{33,84,157}

\setbeamercolor*{structure}{bg=myblue!20,fg=myblue}

\setbeamercolor*{palette primary}{use=structure,fg=white,bg=structure.fg}
\setbeamercolor*{palette secondary}{use=structure,fg=white,bg=structure.fg!75}
\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=black}
\setbeamercolor*{palette quaternary}{fg=white,bg=black}

\setbeamercolor{section in toc}{fg=black,bg=white}
\setbeamercolor{alerted text}{use=structure,fg=structure.fg!50!black!80!black}

\setbeamercolor{titlelike}{parent=palette primary,fg=structure.fg!50!black}
\setbeamercolor{frametitle}{bg=myblue!85,fg=white}

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

\author{The Author}
\title{Work Culture}
\begin{document}
\begin{frame}
\titlepage
\end{frame}

\begin{frame}
\frametitle{Test title}
\framesubtitle{Test subtitle}
test text
\end{frame}

\end{document}

在此处输入图片描述

另一种选择是利用方案类似于预定义whale颜色主题的事实,因此您不必重新定义所有调色板,而是可以加载颜色主题并对某些元素进行微小更改:

\documentclass[xcolor={dvipsnames}]{beamer}
\usetheme{CambridgeUS}
\usecolortheme{whale}

\setbeamercolor*{palette tertiary}{use=structure,fg=white,bg=black}
\setbeamercolor*{palette quaternary}{fg=white,bg=black}

\setbeamercolor{frametitle}{bg=structure!75,fg=white}

\author{The Author}
\title{Work Culture}
\begin{document}
\begin{frame}
\titlepage
\end{frame}

\begin{frame}
\frametitle{Test title}
\framesubtitle{Test subtitle}
test text
\end{frame}

\end{document}

在此处输入图片描述

相关内容