'LaTeX Error: `xcolor.sty' not found when including tikz

my preamble is currently looking like this:

\documentclass[12pt,a4paper]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{float}
\usepackage[utf8]{inputenc}
\usepackage{subfigure} 
\usepackage[pdftex]{graphicx}
\usepackage{latexsym}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{listings}
\usepackage{geometry}

When I include

\usepackage{tikz}

I get the error message ! LaTeX Error: File `xcolor.sty' not found.

I have tried to \include{xcolor} before and after tikz which didn't work. Also from another post I have seen that I should \PassOptionsToPackage{table}{xcolor} before declaring the document class. Whatever I do I still get the same error. What am I doing wrong?



Solution 1:[1]

In MikTeX this package may be located here: \MiKTeX 2.9\tex\latex\xcolor\xcolor.sty. If not, please download xcolor.sty and put it into your working directory or, better, the whole package xcolor.

Also try to to use the package xcolor:

\usepackage{xcolor}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 naimdjon