我正在尝试更改模板中标题栏的颜色GeoURV 海报模板。我知道我可以在 beamerthemeGeoURV.sty 中更改颜色。但我希望它以渐变样式更改,比如从黑色变为橙色。
答案1
您可以像这样重新定义标题模板(根据需要更改 l.9 中的值以匹配标题的高度):
\input{preamble.tex}
\input{metadata.tex}
\setbeamercolor{headline}{bg=}
\makeatletter
\newlength{\foo}
\setlength{\foo}{8cm}
\pgfdeclareverticalshading{beamer@frametitleshade}{\paperwidth}{%
color(0pt)=(black);
color(\foo)=(col3)
}
\setbeamertemplate{headline}{
\leavevmode
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\foo}
\begin{pgfscope}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\foo}}%
\pgfusepath{clip}%
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}%
\end{pgfscope}
\end{pgfpicture}
\vskip-\foo
\begin{beamercolorbox}[wd=\paperwidth]{headline}
\begin{columns}[T]
\begin{column}{.02\paperwidth}
\end{column}
\begin{column}{.7\paperwidth}
\vskip4ex
\raggedright
\usebeamercolor{title in headline}{\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]}
\usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]}
\usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}
\end{column}
\begin{column}{.25\paperwidth}
\vskip8ex
\begin{center}
\includegraphics[width=.8\linewidth]{figures/dgeo-apilat-color.png}
\end{center}
\vskip2ex
\end{column}
\begin{column}{.02\paperwidth}
\end{column}
\end{columns}
\vskip2ex
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
\rule{0pt}{3pt}
\end{beamercolorbox}
}
\makeatother
\useinnertheme[rounded]{tcolorbox}
\tcbsetforeverylayer{
frame style={draw=col4,line width=2mm}
}
\begin{document}
\begin{frame}[t]
\end{frame}
\end{document}