I was thinking of adding a sprinkle of the pride rainbow in my CV without making it too bold. Thus, I thought it would be better to subtly embed it within the horizontal lines between sections in moderncv
. I am using the banking
style.
I have found this MWE to change the color of horizontal lines in moderncv (taken from here):
\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}
\usepackage[scale=0.75]{geometry}
\firstname{John} % Your first name
\familyname{Smith} % Your last name
\title{Curriculum Vitae}
%%%%% added lines
\colorlet{titlerulecolor}{orange}
\usepackage{titlesec}
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[{\color{titlerulecolor}\titlerule}]
\titlespacing{\section}{0pt}{3pt}{3pt}
%%%%%
\begin{document}
\makecvtitle
\section{Education}
\cventry{2011--2012}{Masters of Commerce}{The University of California}{Berkeley}{\textit{GPA -- 8.0}}{First Class Honours}
\section{Masters Thesis}
\cvitem{Title}{\emph{Money Is The Root Of All Evil -- Or Is It?}}
\subsection{A subsection}
\cvitem{Supervisors}{Professor James Smith \& Associate Professor Jane Smith}
\end{document}
However, this solution messes up the titles and the dashed line for the subsection. This example makes this output:
Although, without those added lines, it looked like this:
And for rainbow colors in TeX, I have found this answered question about the rainbow coloring of a single letter, and this one about defining a rainbow-gradient macro.
How can I make the horizontal lines that rainbow-colored? Preferably, the outcome color should consist of discrete colors (red, orange, yellow, green, royal blue, violet) rather than a gradient.
P.S. Is it also possible to increase the line widths so they become a bit more visible?
Thanks in advance!
Edit: added MWE and changed the text.