1

I'm using the CurVe CV template in Overleaf.

I've changed the colour scheme to purple (from default of green).

In the header, I want to include my email, twitter, phone and ORCiD details, using Font Awesome.

All those logos have been changed to purple, but I want to be able to choose the colour of each logo independently, using HEX or RGB codes, rather than words like green or blue

\documentclass[a4paper,11pt,english]{curve}

\usepackage{settings}
  \usepackage{fontspec} 
  \usepackage[p,osf,swashQ]{cochineal}
  \usepackage[medium,bold]{cabin}
  \usepackage[varqu,varl,scale=0.9]{zi4}
\else % If you're using pdfLaTeX or latex
  \usepackage[T1]{fontenc}
  \usepackage[p,osf,swashQ]{cochineal}
  \usepackage{cabin}
  \usepackage[varqu,varl,scale=0.9]{zi4}
\fi

\myname{xxx}{xxx}

\definecolor{SwishLineColour}{HTML}{000080}
\definecolor{MarkerColour}{HTML}{000080}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\leftheader{%
  {\LARGE\bfseries\sffamily xxx
  \vspace{5} \\
  xxxxxx}\\
  
  %
  \makefield{\faEnvelope[regular]}{\texttt{xxx@xxx.com}}
  \makefield{\color{blue}\faTwitter}{\texttt{@xxx}}
  \makefield{\faPhone}{\texttt{{+xx}xxxx}}\\
  \makefield{\color{green}\faOrcid}{0000-0000-0000-0000}\\
  %

The code I want to change is this last section to allow me to define the colour of each logo by HEX or RGB rather than the "green" or "blue":

\makefield{\color{HEX or RGB}\faTwitter}{\texttt{@xxx}}

cabad
  • 4,555
  • 1
  • 20
  • 33
mda08rds
  • 59
  • 7

1 Answers1

1

You can define your own colours in hex, rgb etc.

\definecolor{mycolour}{HTML}{0BA080}    
\definecolor{mygreen}{rgb}{0,0.8,0}

and then use these colours for your icons.

Some other comments:

  • you mustn't use \else ... \fi without an if statement before it

  • your \leftheader{ lacks a closing }


% !TeX TS-program = lualatex

\documentclass[a4paper,11pt,english]{curve}

  \usepackage{settings}
  \usepackage{fontspec} 
  \usepackage[p,osf,swashQ]{cochineal}
  \usepackage[medium,bold]{cabin}
  \usepackage[varqu,varl,scale=0.9]{zi4}
%\else % If you're using pdfLaTeX or latex
%  \usepackage[T1]{fontenc}
%  \usepackage[p,osf,swashQ]{cochineal}
%  \usepackage{cabin}
%  \usepackage[varqu,varl,scale=0.9]{zi4}
%\fi

\myname{xxx}{xxx}

\definecolor{SwishLineColour}{HTML}{000080}
\definecolor{MarkerColour}{HTML}{000080}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\definecolor{mygreen}{rgb}{0,0.8,0}


\leftheader{%
  {\LARGE\bfseries\sffamily xxx
  \vspace{5pt} \\
  xxxxxx}\\
  
  %
  \makefield{\faEnvelope[regular]}{\texttt{xxx@xxx.com}}
  \makefield{\color{blue}\faTwitter}{\texttt{@xxx}}
  \makefield{\faPhone}{\texttt{{+xx}xxxx}}\\
  \makefield{\color{mygreen}\faOrcid}{0000-0000-0000-0000}\\
  %
}



\rightheader{~}


\title{Curriculum Vitae}

\begin{document}
\makeheaders[c]

\makerubric{employment}
\makerubric{education}

test

\end{document}

enter image description here

  • Thank you Sam, I've copied your code as suggested, defining the colours by RGB value, but when I apply it to the ```\makefield{\color{mygreen}\faOrcid}{0000-0000-0000-0000}``` it has made the logo itself disappear from the compiled document. When I code as ```\makefield{\color{green}\faOrcid}{0000-0000-0000-0000}``` it works OK (its just the default green shade is not quite the same as the specific ORCiD green shade) – mda08rds Jul 06 '22 at 07:40
  • 1
    @mda08rds Please show the exact code you tried. It works fine in my example – samcarter_is_at_topanswers.xyz Jul 06 '22 at 08:04
  • ```\definecolor{myblue}{rgb}{29,161,242} \definecolor{mygreen}{rgb}{166,206,57}``` and then ```\makefield{\color{myblue}\faTwitter}{\texttt{@xxx}} \makefield{\color{mygreen}\faOrcid}{0000-000-0000-0000}``` – mda08rds Jul 06 '22 at 08:24
  • 1
    These values are above 1, you need the `RGB` colour model instead of `rgb` – samcarter_is_at_topanswers.xyz Jul 06 '22 at 08:28