If I want to use predefined colors to color rows with the colortbl package, it doesn't work:
\documentclass{article}
\usepackage{xcolor}
\usepackage{color}
\usepackage{array}
\usepackage{colortbl}
\definecolor{anti-flashwhite}{rgb}{0.95, 0.95, 0.96}
\begin{document}
\begin{tabular}{c|c}
\rowcolor[anti-flashwhite]{0.5}Eins & Zwei \\
\rowcolor[gray]{0.5}Drei & Vier
\end{tabular}
\end{document}
Any ideas how to make it work?
\rowcolor{anti-flashwhite}{0.5}the optional argument would correspond to a color model such as rgb, cmyk or gray. Hence the error messagePackage xcolor Error: Undefined color model anti-flashwhite.that you will get from your code. – leandriis Apr 09 '20 at 17:11xcolor,colorandcolortblyou only need\usepackage[table]{xcolor}. – leandriis Apr 09 '20 at 17:13\usepackage[table]{xcolor}still doesn't work for me. Same error messagePackage xcolor Error: Undefined color model anti-flashwhite.– LinusDieLinse Apr 09 '20 at 17:42anti-flashwhitemust be placed in a set of{}instead of[]when used with the\rowcolorcommand. The remark about the packages was more a side note than actually related to the error message itself. – leandriis Apr 09 '20 at 17:49