Graphics, Figures & Tables ⇒ Package xcolor Error:Undefined color model 'red'
Package xcolor Error:Undefined color model 'red'
I have been using the xcolor package to do this, with the \rowcolor command. The command works perfecty when i use "gray", however as soon as i try any other color(even if I specifically define it) it gives me the error:
Package xcolor Error: Undefined color model 'red'
Any ideas would be useful.
thanks,
Chris
Here is my code...
...
\usepackage{color}
\usepackage{xcolor}
\usepackage[table]{xcolor}
\definecolor{red}{RGB}{255,0,0}
...
\begin{center}
\begin{tabular}{|l|c|c|}
\hline
\multicolumn{3}{|c|}{\bf{Paddle Pinout}} \\
\hline
\rowcolor[red]{.9} Pin \#&(Left Paddle)&(Right Paddle)\\
\hline
1, N.A. & & \\ \hline
2, Red (Power) & 50 & 50\\ \hline
\end{tabular}
\end{center}
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
Package xcolor Error:Undefined color model 'red'
I think it would behoove you to read the xcolor package documentation so you understand the difference between color models and colors.
Also, there is no need to load the color package if you're loading xcolor, and xcolor should only be loaded once.
Also, please pay attention to the Board Rules, and the post on Post on Avoidable Mistakes, especially with regard to putting code in code boxes and always providing complete compiliable minimal working examples.
I suspect what you want is probably something like this:
Code: Select all
\documentclass{article}
\usepackage[table]{xcolor}
\begin{document}
\begin{center}
\begin{tabular}{|l|c|c|}
\hline
\multicolumn{3}{|c|}{\bf{Paddle Pinout}} \\
\hline
\rowcolor{red!90!white} Pin \#&(Left Paddle)&(Right Paddle)\\
\hline
1, N.A. & & \\ \hline
2, Red (Power) & 50 & 50\\ \hline
\end{tabular}
\end{center}
\end{document}
Re: Package xcolor Error:Undefined color model 'red'
Thanks again,
Chris
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Package xcolor Error:Undefined color model 'red'
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10