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

redefining maincolor does not work properly #34

Closed
ninohardt opened this issue Mar 11, 2021 · 3 comments
Closed

redefining maincolor does not work properly #34

ninohardt opened this issue Mar 11, 2021 · 3 comments

Comments

@ninohardt
Copy link

First of all, awesome template!

I redefined maincolor, like this:

\definecolor{maincolor}{rgb}{0.54, 0.29, 0.42}

While Name and mail/phone/email/flag icons appear in that color, the other sidebar section headers don't.

I believe the issue is this:

\colorlet{pseccolor}{maincolor!90}

Using !90 might not work on rgb-defined colors?
Not sure what a remedy would be.

@PandaScience
Copy link
Owner

Hi! Sorry for the late reply, we are in the middle of a move right now. 🚛 🏃‍♂️

You're right, the problem here are the derived colors. By the time you are redefining maincolor they are already set to whatever maincolor has been at the time of processing the respective code line.

You need to use the Class Option instead:

\documentclass[a4paper,..., maincolor=somecolor]{fortysecondscv}

However, this only works with predefined colors (dvipsnames, svgnames, x11names 🠦 see xcolor docs for details). In case you want to define your own color you need to do so before loading the fortysecondscv class:

\RequirePackage[dvipsnames, svgnames, x11names]{xcolor}
\definecolor{mycolor}{rgb}{0.54, 0.29, 0.42}
\documentclass[a4paper,..., maincolor=mycolor]{fortysecondscv}

Make sure you use the exact same class options for xcolor to prevent option clash. Of course, you can also modify the class file directly and change the definition of maincolor there.

Hope that helps.

@ninohardt
Copy link
Author

Thank you. Yes, this is great. I have used TeX for many years, but my documents would always start with \documentclass[... - I didn't even think about defining the color before it.

@PandaScience
Copy link
Owner

Great! So I will close this issue then and add a reference in the readme. 👍

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

No branches or pull requests

2 participants