TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The Problem is '!Package xcolor Error: Undefined Color 'Black'. See the xcolor package documentation....' Perhaps is a simple mistake due to the fact that I'm a newby. Using MiKteX, xcolour package was manually installed through the manager.

    \documentclass[twoside,a4paper,11pt]{scrartcl}

    \usepackage{structuralanalysis}
    \usepackage{xcolor}
    \usepackage{pgf}

    \begin{document}

    \begin{tikzpicture}
        \point{x}{3}{0};
        \point{y}{3}{3};

        \draw[line width=1.5pt, fill=Black]
        (x) rectangle (y);
    \end{tikzpicture}
share|improve this question
1  
Welcome, try black instead of Black. – Johannes_B Feb 29 at 7:43
1  
@Johannes_B thanx, working for black. But what is with other colors like RubineRed or mixtures like RubineRed!25!White – Miri Feb 29 at 7:47
1  
The xcolor manual has an overview of what colors are defined with which option. – Johannes_B Feb 29 at 7:58

LaTeX is case sensitive, therefore black is different from Black. If you want to use Black, you need to load xcolor with options svgnames or dvipsnames, both define this color with capital B.

But if you try \usepackage[svgnames]{xcolor} an error for clashing options will appear beacuse pgf (TiKZ) load xcolor with different options. In this case it's better to pass xcolor options through documentclass command.

\documentclass[twoside,a4paper,11pt,svgnames]{scrartcl}

\usepackage{structuralanalysis}
%\usepackage{xcolor} % pgf already loads it
\usepackage{pgf}

\begin{document}

\begin{tikzpicture}
    \point{x}{3}{0};
    \point{y}{3}{3};

    \draw[line width=1.5pt, fill=Black]
    (x) rectangle (y);
\end{tikzpicture}
\end{document}
share|improve this answer
1  
thanx! for Black and simple colors it worked, but not for RubineRed or RubineRed!25!White, which cofuses me. – Miri Feb 29 at 7:57
1  
@Miri Does en.wikibooks.org/wiki/LaTeX/Colors help you? – Johannes_B Feb 29 at 8:02
1  
@Miri RubineRed is defined with dvipsnames option, if you add it, you could use all named colors. Take a look a page 38 in xcolor. – Ignasi Feb 29 at 8:03
    
it's good, thank you all for the help! – Miri Feb 29 at 8:07
    
@Miri, if the answer solved your problem, please accept it --- marking the ticks you have under the answer's score. This is the way of saying "thanks" here... ;-) – Rmano Feb 29 at 8:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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