Graphics, Figures & Tablescolortbl, xcolor | Unrecognized Color Model

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

colortbl, xcolor | Unrecognized Color Model

Post by Bozack »

I seem to have problems with using dvipsnames color names when working with the colortbl package, as the following example should show:

Code: Select all

\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{colortbl}

\begin{document}

blah blah {\color{Red} blah} blah

\begin{tabular}{l l l l}
  head 1& head 2& head 3& head 4\\
  \rowcolor[Red]{.85} 
  fill A& fill B& fill C& fill D\\
  fill A& fill B& fill C& fill D\\
  fill A& fill B& fill C& fill D
\end{tabular}

\end{document}
The "blah" in the top correctly gets a red color, but I get an

Code: Select all

Package xcolor Error: Undefined color model `Red'.
for the line with the \rowcolor command - even though the color is clearly understood.

Has anyone found this problem before, and know how to fix it so I can use the dvipsnames color names in my table colors?
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit

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

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

colortbl, xcolor | Unrecognized Color Model

Post by cgnieder »

The syntax for the command \rowcolor is

Code: Select all

\rowcolor{color name} % or
\rowcolor[color model]{color specs}
Since there is no color model »Red« you get this error. Read the xcolor manual for detailed information about colors, color names, color models and color specifications.

In the case at hand you probably want

Code: Select all

\rowcolor{red!85}
Regards
site moderator & package author
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

colortbl, xcolor | Unrecognized Color Model

Post by Bozack »

cgnieder wrote:The syntax for the command \rowcolor is

Code: Select all

\rowcolor{color name} % or
\rowcolor[color model]{color specs}
In the case at hand you probably want

Code: Select all

\rowcolor{red!85}
Thank you so much for your answer - that was exactly what I was looking for :)
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit
Post Reply