[Tex/LaTex] Change the background color in the title

colorformattingtitlestitling

I need to set the background color in my definition of the title but I don't know how I can do. I have the next definition:

\pretitle{\vspace{-90pt} \begin{flushleft} \HorRule \fontsize{20}{20} \usefont{OT1}{phv}{b}{n} \color{AzulUnir}  \selectfont }
\title{This is the title of the template article}   
\posttitle{\par\end{flushleft}\vskip 0em}   
\preauthor{\begin{flushleft} \large \lineskip 0em \usefont{OT1}{phv}{b}{sl} \color{AzulUnir}}   
\author{Firstname Lastname, 
 \postauthor{\footnotesize \usefont{OT1}{phv}{m}{sl} \color{Black} Universdad \par\end{flushleft}\HorRule}

[EDIT] I'm using this template http://www.howtotex.com/download/2col-color-art-howtotex.tex but I need to customize the background color in the title and a in the section but I don't khow how to make none of them.

Best Answer

It's quite unclear what you want to do; however this changes the background color of the title to green (pick your favorite color)

\newsavebox{\titlebox}
\pretitle{%
  \vspace{-30pt}
  \noindent\HorRule\\[1ex]
  \begin{lrbox}{\titlebox}
  \begin{minipage}{\dimexpr\textwidth-2\fboxsep\relax}\raggedright
  \fontsize{50}{50}\usefont{OT1}{phv}{b}{n}\color{DarkRed}\selectfont
}
\posttitle{%
  \par
  \end{minipage}\end{lrbox}
  \colorbox{green}{\usebox{\titlebox}}\par
  \vskip 1ex}
\title{This is the title of the template article}

The code should go in place of your original \pretitle and \posttitle definitions.