3

I'm using moderncv to create a letter and I want to change the title color in the letter. I'm using LaTeX for the first time and even if I already got to do that in other moderncv sections, I have no clue how I could do that in that part :/.

\documentclass[11pt,a4paper,sans]{moderncv}        
\moderncvstyle{casual}                              
\moderncvcolor{green}                               


\usepackage[scale=0.80]{geometry}
\usepackage[utf8]{inputenc} 
\usepackage[ngerman]{babel} 
\usepackage[T1]{fontenc}    
\usepackage[ngerman, num]{isodate}
\usepackage{ragged2e}


\name{First}{Last} 
\makeatletter\name{First name\gdef\@firstname{}}{Last name\gdef\@lastname{}}\makeatother
\address{Street}{City}
\phone[mobile]{Number}                
\email{Mail}                              
\photo[80pt][0.4pt]{pb}                      
\usepackage{multibib}
\newcites{book,misc}{{Books},{Others}}

\begin{document}

\recipient{company}{adress}
\date{\today}
\opening{
\begin{center} 
 \vspace{-\baselineskip} 
 \bfseries \large I want to change the color of this text to moderncv green %or by use of RGB  
\end{center} Hallo to someone ,}
\closing{Thank you,\\ \hbox{\hspace{-0.0cm} \includegraphics[width=3cm]{cat}} \vspace{-1cm}}
\enclosure[Text]{Text}

\makelettertitle 

\justify

some Text  \vspace{1cm}

\makeletterclosing


\end{document}
2

Use

\textcolor{green}{text}

Or you can use RGB for a more customizable version

\definecolor{mygreen}{RGB}{10,200,50}  
\textcolor{mygreen}{text}

In your document

\documentclass[11pt,a4paper,sans]{moderncv}        
\moderncvstyle{casual}                              
\moderncvcolor{green} 
\definecolor{mygreen}{RGB}{10,200,50}                              


\usepackage[scale=0.80]{geometry}
\usepackage[utf8]{inputenc} 
%\usepackage[ngerman]{babel} 
\usepackage[T1]{fontenc}    
\usepackage[ngerman, num]{isodate}
\usepackage{ragged2e}


\name{First}{Last} 
\makeatletter\name{First name\gdef\@firstname{}}{Last name\gdef\@lastname{}}\makeatother
\address{Street}{City}
\phone[mobile]{Number}                
\email{Mail}                              
\photo[80pt][0.4pt]{pb}                      
\usepackage{multibib}
\newcites{book,misc}{{Books},{Others}}

\begin{document}

\recipient{company}{adress}
\date{\today}
\opening{
\begin{center} 
 \vspace{-\baselineskip} 
 \bfseries \large \textcolor{green}{I want to change the color} \textcolor{mygreen}{of this text to moderncv green} %or by use of RGB  
\end{center} Hallo to someone ,}
\closing{Thank you,\\ \hbox{\hspace{-0.0cm} \includegraphics[width=3cm]{example-image-a}} \vspace{-1cm}}
\enclosure[Text]{Text}

\makelettertitle 

\justify

some Text  \vspace{1cm}

\makeletterclosing


\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.