我在用着
\documentclass{beamer}
\usepackage{BeamerColor}
\usepackage[english]{babel}
\mode<presentation> {
\usetheme{myown}
\usecolortheme[named=salmon]{structure}
\setbeamercovered{transparent} }
\setbeamercolor{lower separation line head}{bg=LightSteelBlue3}
\setbeamercolor{lineup}{bg=salmon}
\setbeamercolor{linemid}{bg=IndianRed2}
\setbeamercolor{linebottom}{bg=LightSteelBlue3}
\begin{document}
title
\end{document}
其中 \usetheme{myown}
定义为
\useoutertheme[footline=authortitle]{miniframes}
\useinnertheme{rectangles}
\usecolortheme{whale}
\usecolortheme{orchid}
\definecolor{beamer@blendedblue}{rgb}{0.137,0.466,0.741}
\setbeamercolor{structure}{fg=beamer@blendedblue}
\setbeamercolor{titlelike}{parent=structure}
\setbeamercolor{frametitle}{fg=black}
\setbeamercolor{title}{fg=black} \setbeamercolor{item}{fg=black}
\setbeamertemplate{headline}
{%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=1.7ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{section in head/foot}
\vskip2pt\insertsectionnavigationhorizontal{\paperwidth}{}{}
\end{beamercolorbox}%
\ifbeamer@theme@subsection%
\begin{beamercolorbox}[colsep=1.5pt]{middle separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=1.7ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{subsection in head/foot}
\usebeamerfont{subsection in head/foot}\insertsubsectionhead
\end{beamercolorbox}%
\fi%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
} \mode <all>
\makeatletter
\DeclareOptionBeamer{compress}{\beamer@compresstrue}
\ProcessOptionsBeamer
\mode<presentation>
% The footline template is a modification of the one used in the
% Torino theme, Copyright 2007 by Marco Barisione
\setbeamercolor*{lineup}{parent=palette primary}
\setbeamercolor*{linemid}{parent=palette secondary}
\setbeamercolor*{linebottom}{parent=palette tertiary}
\setbeamercolor*{page header}{parent=titlelike}
\mode <all>
% some lengths (the height of the lines)
\newlength{\beamer@decolines@linemid}
\setlength{\beamer@decolines@linemid}{.015\paperheight}
\newlength{\beamer@decolines@lineup}
\setlength{\beamer@decolines@lineup}{.025\paperheight}
\newlength{\beamer@decolines@linebottom}
\setlength{\beamer@decolines@linebottom}{.01\paperheight}
% String used between the current page and the total page count.
\def\beamer@decolines@pageofpages{/}
\defbeamertemplate*{footline}{decolines theme}
{
\leavevmode%
% First line.
\hbox{%
\begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{lineup}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@decolines@lineup,dp=0pt,right]{}%
\hbox{\usebeamerfont{palette primary}\footnotesize\insertframenumber{} \beamer@decolines@pageofpages{} \inserttotalframenumber\hspace*{2ex}}%
\end{beamercolorbox}%
} %
% Second line.
\hbox{%
\begin{beamercolorbox}[wd=\paperwidth,ht=\beamer@decolines@linemid,dp=0pt]{linemid}%
\end{beamercolorbox}%
} %
% Third line.
\hbox{%
\begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{linebottom}%
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{}%
\end{beamercolorbox}%
}%
}
\makeatother
问题是如何修改主题以使两条顶线的颜色与下面使用的相同,即第一条鲑鱼色和第二条 IndianRed2。
答案1
设置两种颜色(我假设所使用的颜色名称在您的系统中可用):
\setbeamercolor{top}{bg=salmon}
\setbeamercolor{bottom}{bg=IndianRed2}%
然后将标题模板的定义更改为
\setbeamertemplate{headline}
{%
\begin{beamercolorbox}[colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=1.7ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{top}
\vskip2pt\insertsectionnavigationhorizontal{\paperwidth}{}{}
\end{beamercolorbox}%
\ifbeamer@theme@subsection%
\begin{beamercolorbox}[colsep=1.5pt]{middle separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[ht=1.7ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{bottom}
\usebeamerfont{subsection in head/foot}\insertsubsectionhead
\end{beamercolorbox}%
\fi%
\begin{beamercolorbox}[colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
}