0

This question already has an answer here:

I am using color package in latex to highlight some of my text in specific red color using RGB format. my code is something like this :

\documentclass[10pt,letterpaper]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\cfoot{\hspace{55mm}CV $|$ \thepage}
\renewcommand{\headrulewidth}{0mm}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{marvosym}
\usepackage{lipsum}
\usepackage{microtype}
\usepackage{siunitx}
\usepackage{ifsym}
\usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
\usepackage{multicol}
\usepackage[width=18.00cm, height=22.00cm]{geometry}
\usepackage{plain}
\usepackage{csquotes}
\usepackage{enumitem}
\usepackage{array}
\renewcommand{\labelenumi}{[\arabic{enumi}]}
\usepackage{afterpage}
%\usepackage{setspace}
\usepackage{titlesec}
\titlespacing{\section}{0mm}{1.2mm}{1.2mm}
%\titleformat{\section}{\bfseries}{\thesection}{1em}{\setstretch{0.01}}

%%%%%%%%%%_____________Color Text Box Packages______________%%%%%%%%%%%
\usepackage{blindtext}
\usepackage{tcolorbox}
\usepackage{graphicx}
\definecolor{mycolor}{rgb}{0.122, 0.435, 0.698}



%%%%%%%%%%_____________Color for Text ______________%%%%%%%%%%%
\usepackage[usenames, dvipsnames]{color}
\usepackage{graphicx}
\definecolor{myred}{RGB}{139,0,0}





%%%%%%%%%%_____________Start of main document______________%%%%%%%%%%%
\begin{document}
\textcolor{myred}{
    \setcounter{secnumdepth}{0}\section{Education}}

\begin{tabular}{p{23mm}p{118mm}r}
    Undergrad&\href{http://www.buet.ac.bd/}{Bangladesh University of Engineering and Technology}, Dhaka&[2013-Present]\\
    &B.Sc. in Mechanical Engineering, CGPA-3.36/4.00\vspace{1.5mm}&[February, 2017]\\
    Higher School&\href{http://www.soshgcdhaka.edu.bd/}{SOS Hermann Gmeiner College}, Dhaka&[2010-2012]\\
    &Higher Secondary Certificate (HSC), CGPA-5.00/5.00\vspace{1.5mm}&\\
    &\href{https://www.acps.edu.bd/}{Adamjee Cantonment Public School}, Dhaka&[2003-2010]\\
    &Secondary School Certificate (SSC), CGPA-5.00/5.00& 
\end{tabular}


\end{document}

But when i try to compile, it shows error message and does not compile :

Option clash for package color. \usepackage

how can i solve this problem?

marked as duplicate by user36296, koleygr, Schweinebacke, Troy, Stefan Pinnow Oct 15 '17 at 11:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • This is basically the same problem as tex.stackexchange.com/questions/51488/… The thing is that tcolorbox loads xcolor which loads color. When loading a package more than once (which you in general might as well try to avoid), the package options used the second time has to be a subset of those used the first time. – Torbjørn T. Sep 15 '17 at 6:17
0

Instead of using this format of using packages,

  \usepackage[usenames, dvipsnames]{color}

I just omitted the [usenames, dvipsnames] part, and now, it compiles just fine.

  • 3
    you could more simply have omitted the entire line. – David Carlisle Sep 15 '17 at 6:54
  • Note the \ usenames option is deprecated, as it has been the default for quite a few years. – Bernard Sep 15 '17 at 9:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.