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

Modifying Colors #46

Open
prateekiiest opened this issue Apr 28, 2018 · 8 comments
Open

Modifying Colors #46

prateekiiest opened this issue Apr 28, 2018 · 8 comments

Comments

@prateekiiest
Copy link

Is there any way of modification of colors ?
Since in some areas it kind of gets faded out

@tonystonee
Copy link

I agree with this question, I try to change the color of the \section and get error:
Package xcolor Error: Undefined color RED'.`

I can't seem to find a work around, anyone know of one?

@bradklassen
Copy link

I am also wondering about changing the color.

@KrishnenduBanerjee
Copy link

Go to the very first option below fonts and then go to the define color section and change the hex code of the heading section into any color u wish to!!!

@fzeiser
Copy link

fzeiser commented Aug 11, 2020

Does following work for you (eg. in the clsfile) :

\usepackage[usenames,dvipsnames]{xcolor}
[...]
\colorlet{primary}{MidnightBlue!50!black}

instead of \definecolor{primary}{HTML}{2b2b2b} to change the color of the primary text.

I've had some issues with hyperref link colors (which I defined as \colorlet{urlcolor}{MidnightBlue!50!black}, leaving the primary color with it's default.) The colored links would not come up in some sections. In that case it helped to insert following statement(s):

\usepackage[colorlinks, linkcolor=urlcolor, urlcolor=urlcolor]{hyperref}
\makeatletter
\def\HyColor@@@@UseColor#1\@nil{\addfontfeatures{Color=#1}}
\makeatother

@fzeiser
Copy link

fzeiser commented Aug 11, 2020

For the hyperref comment: It seems like #41 solved it without the \makeatletter part. It I recall it correctly, without it, my links were colored only in some environments of the document.

@tilaktrs
Copy link

tilaktrs commented Apr 3, 2021

can anyone give final code for changing color of the section !

@fzeiser
Copy link

fzeiser commented Apr 9, 2021

Within the cls file, use following section to get e.g. green text in the sections that use primary as color. For convenience, I changed the color specification to use dvinames instead of the Hexcode:

% Package Imports
\usepackage[hmargin=1.25cm, vmargin=0.75cm]{geometry}
\usepackage[hidelinks]{hyperref}
\hypersetup{colorlinks, breaklinks, urlcolor=SkyBlue, linkcolor=SkyBlue}

% Publications
\usepackage{cite}
\renewcommand\refname{\vskip -1.5cm}

% Color definitions
\usepackage[usenames,dvipsnames]{xcolor}
\definecolor{date}{HTML}{666666}
% \definecolor{primary}{HTML}{2b2b2b} % <-- old definition
\definecolor{headings}{HTML}{6A6A6A}
\definecolor{subheadings}{HTML}{333333}
\colorlet{primary}{green} % <-- new definition; use any other color you like [or define it as HTML above, if preferred]

@gururani-abhishek
Copy link

I agree with this question, I try to change the color of the \section and get error: Package xcolor Error: Undefined color RED'.`

I can't seem to find a work around, anyone know of one?

I'm way too late, but that's because everything is casted into Upper Case, so red -> RED which is not identified. Just add these two lines :
\usepackage{xcolor} -> to add color package
\colorlet{BLUE}{blue} -> to tell the compiler consider BLUE(due to automatic casting) as blue.

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

7 participants