Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I customise the font colour #382

Closed
me7pako opened this issue Dec 13, 2021 · 1 comment
Closed

How can I customise the font colour #382

me7pako opened this issue Dec 13, 2021 · 1 comment

Comments

@me7pako
Copy link

me7pako commented Dec 13, 2021

First of all, thanks for the terrific template. I am actually using it for my cover letter and will be crediting the creator.
My question is: how am I supposed to change the color of the text, I mean the 3 paragraphs that are written in some light gray, the ones below each of the 3 sections: about me, why google and why me?
It is written that I need to uncomment the \definecolor.... commands, but how do I turn the light gray text into black or a darker shade of grey -no pun intended, really-
Thanks in advance boys and gals.

@me7pako me7pako changed the title a stupid question, sorry again a stupid question, sorry ! Dec 13, 2021
@OJFord OJFord changed the title a stupid question, sorry ! How can I customise the font colour Dec 18, 2021
@dcsim
Copy link
Contributor

dcsim commented Dec 23, 2021

I think this one may actually be a bug report (or unintentional behavior report) from \color carrying forward from the lettersection command into the letter environment. I haven't look for other issues that relate to this but there may be some.

Relevant Sections of Code:

% For elements of the cover letter
...
\newcommand*{\lettertextstyle}{\fontsize{10pt}{1.4em}\bodyfontlight\upshape\color{graytext}}
...

%-------------------------------------------------------------------------------
% Commands for elements of Cover Letter
%-------------------------------------------------------------------------------
% Define an environment for cvletter
\newenvironment{cvletter}{%
\lettertextstyle
}{%
}

% Define a section for the cover letter
% Usage: \lettersection{}
\newcommand{\lettersection}[1]{%
\par\addvspace{2.5ex}
\phantomsection{}
\lettersectionstyle{#1}
\color{gray}\vhrulefill{0.9pt}
\par\nobreak\addvspace{0.4ex}
}

\color meets an enviroment

The \color{gray} from \lettersection{} carries foward in the {cvletter} environment. As a result, the \color{graytext} implicated by \lettertextstyle in the definition of the cvletter environment is incapable of impacting paragraph text color if cover letter sections are used. The definition of {graytext} relies on the definition of {gray} so this expected (but unintented) behavior is easy to miss.

To reproduce this behavior:

  1. Change \color{gray} to \color{awesome} in the lettersection command in awesome-cv.cls, and
  2. Add \color{graytext} between one of the \lettersection{Something} and the text that follows in coverletter.tex.

Screenshot_20211222_200442

This means that changing the values of {graytext}, or any of the color definitions, within coverletter.tex when using sections will have no impact on the color of the text within the paragraphs.

It will however change the color of everything else that it is expected to change.

Screenshot_20211222_202403

If the color definitions are changed but sections are not used, the paragraph text color changes as expected.

Screenshot_20211222_202230

This is easy enough to recreate by:

  1. uncommenting the line beginning with \definecolor{graytext} in coverletter.tex,
  2. changing the html value to something exciting like {684592},
  3. building the coverletter once with sections and once without.

The same is true for changes to the definition of {graytext} within the classfile. If you swap \colorlet{graytext}{gray} for \definecolor{graytext}{HTML}{684592} you'll see no change in the resulting coverletter.pdf when using sections.

Proposed Fix

The simplest fix may be to modify the lettersection command slightly:

% Define a section for the cover letter
% Usage: \lettersection{}
\newcommand{\lettersection}[1]{%
\par\addvspace{2.5ex}
\phantomsection{}
\lettersectionstyle{#1}
\color{gray}\vhrulefill{0.9pt}
\par\nobreak\addvspace{0.4ex}
\lettertextstyle %---- This is added to make the text that follows behave as expected
}

With this addition, changes to the value of {graytext} within coverletter.tex and the class file do in fact change the color of the paragraph text. While this makes everything behave as expected, it may not solve the question that was actually asked, unless the intent is to change the color of everything that relies on the the color of {graytext}.

Answer to the Actual Question

@me7pako: You could edit your awesome-cv.cls file as described above (just the "Proposed Fix") but it may not result in the output you expect.

If you want to change only the color of the paragraph text I might suggest:

  1. Defining a new color

% Colors for text
% Uncomment if you would like to specify your own color
% \definecolor{darktext}{HTML}{FFFF00} %yellow
% \definecolor{text}{HTML}{6F4E37} %brown
% \definecolor{graytext}{HTML}{684592} %hot pink
% \definecolor{lighttext}{HTML}{E6E6FA} %lavender
\definecolor{pakocolor}{HTML}{546454} % change the color code to whatever you want

  1. Reseting the color following section headings

\lettersection{About Me}
\color{pakocolor} % add this to make paragraph text the color you want
Lorem ipsum dolor sit amet, co.....

\lettersection{Why Google?}
\color{pakocolor} % add this here too
Suspendisse commodo, massa eu.....

\lettersection{Why Me?}
\color{pakocolor} % add it after all the \lettersection
Duis sit amet magna ante, at.....

@OJFord OJFord closed this as completed in 1d0a7d6 Dec 31, 2021
winci pushed a commit to winci/Awesome-CV that referenced this issue Jun 23, 2022
gr211 pushed a commit to gr211/Awesome-CV that referenced this issue Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants