Open prateekiiest opened 6 years ago
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 am also wondering about changing the color.
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!!!
Does following work for you (eg. in the cls
file) :
\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
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.
can anyone give final code for changing color of the section !
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]
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.
Is there any way of modification of colors ? Since in some areas it kind of gets faded out