posquit0 / Awesome-CV

:page_facing_up: Awesome CV is LaTeX template for your outstanding job application
LaTeX Project Public License v1.3c
22.96k stars 4.77k forks source link

Coloring the letters in sections in different colors? #385

Closed me7pako closed 2 years ago

me7pako commented 2 years ago

As the title suggests: I would like to give the 3 letters of the sections 3 different colors. For example: the first letter in red, the second in blue and the last in green. Terrific job btw.

dcsim commented 2 years ago

I don't understand why you're considering this, but if you really want to below is the simplest way I could conceive of doing it.

It requires a few minor edits to awesome-cv.cls.

I've included some edits for resume.tex (and cv.tex and coverletter.tex if you intend to use them as well) to make the modification easier to work with.

Modifying Section Color Behavior in awesome-cv.cls

Within awesome-cv.cls change the \ifbool under % Awesome section color from this:

\ifbool{acvSectionColorHighlight}{{\color{awesome}#1#2#3}}{#1#2#3}

to

\ifbool{acvSectionColorHighlight}{{\color{awesomeSecOne}#1}{\color{awesomeSecTwo}#2}{\color{awesomeSecThree}#3}}{#1#2#3}

This change allows for each of the colors of the first three letters to be defined individually.

Defining Colors in Appropriate .tex Files So You Can Leave the .cls file Alone

Within the appropriate .tex file (resume.tex, cv.tex, and/or coverletter.tex), presumably with the other color definitions, add the following:

\definecolor{awesomeSecOne}{HTML}{789455} \definecolor{awesomeSecTwo}{HTML}{145876} \definecolor{awesomeSecThree}{HTML}{445566}

Adjust the HTML color codes to whatever you want. If you want to use the predefined awesome colors you can find their html color codes within the .cls file.

Note: For the sake of completeness...\definecolor{awesomeSecThree}{awesome-red} will not work but \colorlet{awesomeSecThree}{awesome-red} will.

OJFord commented 2 years ago

Thank you @dcsim! I don't think this is something that will be natively supported, at least not without a much broader scope overhaul, so I'll close this now grateful for your explanation on OP's specific request.