Beamer:自定义标题和页脚背景颜色

Beamer:自定义标题和页脚背景颜色

我想得到

在此处输入图片描述

我忘了更改颜色。有人能告诉我如何才能获得所需的结果吗?这里我使用的代码(部分):

\documentclass[xcolor=dvipsnames]{beamer}

\mode<presentation>
{
%\usetheme{boxes}  
%%% Customize Theme %%%%%%%%%%%%%%%%%%%%%%
%\usetheme{Madrid} % You can use other themes too, but this changes many things. I've found Madrid to be the best for this color scheme

%\usetheme{Warsaw}
\usetheme{Madrid}
   \usecolortheme[named=RawSienna]{structure}
%\usecolortheme{beaver}
    \useoutertheme{infolines}
     \setbeamertemplate{items}[ball]
      \setbeamertemplate{blocks}[rounded][shadow=true]
       \setbeamertemplate{nevigation symbols}{}
        \setbeamercolor{alerted text}{fg=red!80!black}
         \setbeamercolor{background canvas}{bg=}
\xdefinecolor{darkgreen}{rgb}{0,0.35,0}
\colorlet{newred}{red!60!black}
\definecolor{maroon}{rgb}{.5902,.1882,.0765}
\definecolor{sienna}{rgb}{.53,.31,.16}
\definecolor{gold}{rgb}{1,.84314,.0000}
%\setbeamercolor{frametitle}{fg=maroon,bg=gold}
%\usecolortheme[named=maroon]{structure}
 \usepackage{multimedia}
 \usepackage{textpos}
\usepackage{verbatim}                         
%\setbeamercovered{dynamic}

\mode<presentation> 
  % or ...

  \setbeamercovered{transparent}
  % or whatever (possibly just delete it)

}

\usepackage{color}
%\def\green{\color{green}}
\def\red{\color{red}}
\def\green{\color{ForestGreen}}
%\usepackage[usenames]{color}
\usepackage[english]{babel}
% or whatever

\usepackage[latin1]{inputenc}
% or whatever

\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.


\title[Secret Image Sharing] % (optional, use only with long paper titles)
{Implementation Issues of Cryptography}

\subtitle{Secret Image Sharing}
%{Include Only If Paper Has a Subtitle}

\author[MKS (SNU)]{ \textbf{Md Kutubuddin Sardar}\\
\it Assistant Professor\\Department of Mathematics\\ Sister Nivedita University\\
Email id: [email protected]}

\date{\today}




% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.

%\date[22nd December, 2018] % (optional, should be abbreviation of conference name)
%{\textcolor{newred}{Md. K.Sardar is supported by Council of Scientific and Industrial Research (CSIR),Government of India (Award No.09/028(0975)/2016-EMR-1), \& \\ Dutta  is  supported by International Invitation Program of National Institute of Information and Communications Technology (NICT), Japan}}
%{\textcolor{newred}{ISPEC 2018}}

% - Either use conference name or its abbreviation.
% - Not really informative to the audience, more for people (including
%   yourself) who are reading the slides online

\subject{Image Encryption}
% This is only inserted into the PDF information catalog. Can be left
% out. 



% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

%\pgfdeclareimage[height=0.6cm,width=2.1cm]{university-logo}{Univlogo1}
 %\logo{\pgfuseimage{university-logo}}
%\pgfdeclareimage[height=0.6cm,width=2.1cm]{university-logo}{kyushu_uni}
 %\logo{\pgfuseimage{university-logo}}



% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
%\AtBeginSubsection[]
%{
  %\begin{frame}<beamer>{Outline}
   % \tableofcontents[currentsection,currentsubsection]
  %\end{frame}
%}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

%\beamerdefaultoverlayspecification{<+->}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}


\addtobeamertemplate{frametitle}{}{
\begin{textblock*}{300mm}(.85\textwidth,-1cm)
%\includegraphics[height=0.8cm,width=2.2cm]{Univlogo1}
\end{textblock*}}

%\begin{frame}{Outline}
 %\tableofcontents[pausesections]
  % You might wish to add the option [pausesections]
%\end{frame}

\end{document}

输出:

在此处输入图片描述

答案1

您的页脚和目录看起来好像使用了马德里的普通蓝色主题。因此,我认为最简单的方法是保留此主题,只需将标题和框架标题更改为

\setbeamercolor{title}{bg=maroon,fg=gold}
\setbeamercolor{frametitle}{bg=maroon,fg=gold}

\documentclass[xcolor=dvipsnames]{beamer}

\mode<presentation>
{
%\usetheme{boxes}  
%%% Customize Theme %%%%%%%%%%%%%%%%%%%%%%
%\usetheme{Madrid} % You can use other themes too, but this changes many things. I've found Madrid to be the best for this color scheme

%\usetheme{Warsaw}
\usetheme{Madrid}
%   \usecolortheme[named=RawSienna]{structure}
%\usecolortheme{beaver}
    \useoutertheme{infolines}
     \setbeamertemplate{items}[ball]
      \setbeamertemplate{blocks}[rounded][shadow=true]
       \setbeamertemplate{nevigation symbols}{}
        \setbeamercolor{alerted text}{fg=red!80!black}
         \setbeamercolor{background canvas}{bg=}
\xdefinecolor{darkgreen}{rgb}{0,0.35,0}
\colorlet{newred}{red!60!black}
\definecolor{maroon}{rgb}{.5902,.1882,.0765}
\definecolor{sienna}{rgb}{.53,.31,.16}
\definecolor{gold}{rgb}{1,.84314,.0000}
\setbeamercolor{title}{bg=maroon,fg=gold}
\setbeamercolor{frametitle}{bg=maroon,fg=gold}
%\usecolortheme[named=maroon]{structure}
 \usepackage{multimedia}
 \usepackage{textpos}
\usepackage{verbatim}                         
%\setbeamercovered{dynamic}

\mode<presentation> 
  % or ...

  \setbeamercovered{transparent}
  % or whatever (possibly just delete it)

}

\usepackage{color}
%\def\green{\color{green}}
\def\red{\color{red}}
\def\green{\color{ForestGreen}}
%\usepackage[usenames]{color}
\usepackage[english]{babel}
% or whatever

\usepackage[latin1]{inputenc}
% or whatever

\usepackage{times}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.


\title[Secret Image Sharing] % (optional, use only with long paper titles)
{Implementation Issues of Cryptography}

\subtitle{Secret Image Sharing}
%{Include Only If Paper Has a Subtitle}

\author[MKS (SNU)]{ \textbf{Md Kutubuddin Sardar}\\
\it Assistant Professor\\Department of Mathematics\\ Sister Nivedita University\\
Email id: [email protected]}

\date{\today}




% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.

%\date[22nd December, 2018] % (optional, should be abbreviation of conference name)
%{\textcolor{newred}{Md. K.Sardar is supported by Council of Scientific and Industrial Research (CSIR),Government of India (Award No.09/028(0975)/2016-EMR-1), \& \\ Dutta  is  supported by International Invitation Program of National Institute of Information and Communications Technology (NICT), Japan}}
%{\textcolor{newred}{ISPEC 2018}}

% - Either use conference name or its abbreviation.
% - Not really informative to the audience, more for people (including
%   yourself) who are reading the slides online

\subject{Image Encryption}
% This is only inserted into the PDF information catalog. Can be left
% out. 



% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

%\pgfdeclareimage[height=0.6cm,width=2.1cm]{university-logo}{Univlogo1}
 %\logo{\pgfuseimage{university-logo}}
%\pgfdeclareimage[height=0.6cm,width=2.1cm]{university-logo}{kyushu_uni}
 %\logo{\pgfuseimage{university-logo}}



% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
%\AtBeginSubsection[]
%{
  %\begin{frame}<beamer>{Outline}
   % \tableofcontents[currentsection,currentsubsection]
  %\end{frame}
%}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

%\beamerdefaultoverlayspecification{<+->}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}
\frametitle{title}
\end{frame}
\end{document}

在此处输入图片描述

相关内容