Graphics, Figures & Tablescolor | Color not recognized

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

color | Color not recognized

Post by Willie »

Hello. This might be a trivial problem, but it doesn't work for me.
I am using the 'color' package but keep getting an error.

Code: Select all

\documentclass{article}
\usepackage{color}
\begin{document}
	\textcolor{Orange}{Hello World!}
\end{document}
yields the error: 'Undefined color `Orange' '.
I don't see the 'color' package in my MiKTeX packages, and also when running Package Manager it doesn't appear in the list. SAo that might be the problem...
What should I do?
Thanks.

EDIT:

When I use

Code: Select all

\definecolor{light-gray}{gray}{0.8}
for example, it works.
Last edited by Willie on Mon Sep 26, 2011 8:06 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

color | Color not recognized

Post by Frits »

Hi,

Try this:

Code: Select all

\documentclass{article}
\usepackage{xcolor}
\begin{document}
   \textcolor{orange}{Hello World!}
\end{document}
1) The color package is old ;-) The xcolor package is more updated and more advanced.
2) The color 'tags' are case-sensitive, so instead of 'Orange' xcolor recognizes only 'orange' as follows from the package documentation.
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

Re: color | Color not recognized

Post by Willie »

Thank a bunch! it's working.
So is it that my LaTeX distribution does not contain the "color" package because it is too old?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

color | Color not recognized

Post by localghost »

Willie wrote:[…] So is it that my LaTeX distribution does not contain the "color" package because it is too old?
Certainly not. Otherwise you would get an error message about a missing package. The reason why you don't see it in the MPM list is that this package is part of the graphics bundle. And this should be listed in the MPM list.


Thorsten
Post Reply