The original links: https://tex.stackexchange.com/questions/57364/option-clash-for-package-xcolor
So the following is just a copy of the above links:
The
xcolor
package is loaded by listings. Put the line before\usepackage{listings}
.
However your preamble is quite messy. It’s most important that you callhyperref
as the last package and put all options togeometry
beforefancyhdr
.
The packageucs
is useless with your settings.Like Harish wrote
\PassOptionsToPackage{svgnames}{xcolor}
before the line\usepackage{listings}
is fine and the problem is the same withTikZ
. With\PassOptionsToPackage
you can avoid conflicts between options.