1

I have a question about moderncv. I want to work with the moderncv style casual and would like to change the color of the rule in the cvtitle which is defined by

{\color{color2!50}\rule{\textwidth}{.25ex}} 

I defined a color by \definecolor{dagr}{rgb}{0.35,0.35,0.35} and would like to use this color instead of color2!50. How can I do that?

  • I suppose \color{dagr}\rule{\textwidth}{.25ex}} should work. – Bernard Feb 4 '14 at 21:50
2

You can patch \makecvtitle and change the color:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{casual}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\usepackage{etoolbox}

\definecolor{dagr}{rgb}{0.35,0.35,0.35}
\patchcmd{\makecvtitle}
  {\color{color2!50}\rule{\textwidth}{.25ex}}
  {\color{dagr}\rule{\textwidth}{.25ex}}
  {}
  {}

\name{John}{Doe}
\title{Title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}

\begin{document}

\makecvtitle

\section{Education}
\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}  % 

\end{document}

enter image description here

| improve this answer | |

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.