[Tex/LaTex] Option clash with xcolor and TikZ


I want to draw some coloured circles, so I loaded tikz in my preamble. However, now xcolor is telling me that it has an "option clash". How should I fix this?


Hello world.

The error message is this:

! LaTeX Error: Option clash for package xcolor.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.


The package xcolor has already been loaded with options:
There has now been an attempt to load it with options
Adding the global options:
to your \documentclass declaration may fix this.
Try typing  <return>  to proceed.

Best Answer

Load xcolor before tikz:


The problem is that pgf/tikz already loads xcolor so loading it again with a new package option triggers the error message.

Another option is to pass the table option to the class and not to the xcolor package. Then the packages can be loaded in any order: