How to get a horizontally shaded title in a beamer presentation?
There are several post to do this for block titles or frame titles but I did not find anything for the title of the title page.
Edit: I am using the Madrid theme, here is a MWE of my current configuration:
\documentclass[xcolor={dvipsnames,svgnames,table},10pt]{beamer}
\usepackage[T1]{fontenc}
\colorlet{titleleft}{Red}
\colorlet{titleright}{Green}
\setbeamercolor*{frametitle}{fg=white}
\makeatletter
\pgfdeclarehorizontalshading[titleleft,titleright]{beamer@frametitleshade}{0.7\paperheight}{%
color(50pt)=(titleleft);
color(0.85\paperwidth)=(titleright)}
\defbeamertemplate*{frametitle}{horizontal shading}
{%
\nointerlineskip%
\vskip+3pt%
\hbox{\leavevmode
\advance\beamer@leftmargin by -12bp%
\advance\beamer@rightmargin by -12bp%
\beamer@tempdim=\textwidth%
\advance\beamer@tempdim by \beamer@leftmargin%
\advance\beamer@tempdim by \beamer@rightmargin%
\hskip-\Gm@lmargin\hbox{%
\setbox\beamer@tempbox=\hbox{\begin{minipage}[b]{\paperwidth}%
\vbox{}\vskip-.75ex%
\leftskip0.3cm%
\rightskip0.3cm plus1fil\leavevmode
\insertframetitle%
\ifx\insertframesubtitle\@empty%
\strut\par%
\else
\par{\usebeamerfont*{framesubtitle}{\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}\strut\par}%
\fi%
\nointerlineskip
\vbox{}%
\end{minipage}}%
\beamer@tempdim=\ht\beamer@tempbox%
\advance\beamer@tempdim by 2pt%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\beamer@tempdim}
\usebeamercolor{frametitle right}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
\end{pgfpicture}
\hskip-\paperwidth%
\box\beamer@tempbox%
}%
\hskip-\Gm@rmargin%
}%
\vskip-2pt
}
\makeatother
\setbeamertemplate{frametitle}[rounded corners]
\title{TEST}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{$\hspace{5em}$\textbf{Test}}
a Test frame
\end{frame}
\end{document}
We can clearly see that the title isn't shaded unlike the frame title.
Best Answer
There you go: