# Row colored with alternatingly with \taburowcolors is pink

I'm making a table with tabu having alternating row color, but I'm getting a pink row, which is not a color that I defined.

The code:

\definecolor{lightb}{RGB}{217,224,250}
\begin{table}
\begin{tabu}{>{\bfseries}lX[l]}
\toprule
\taburowcolors{lightb..white}
Row1 & #1 \\
Row2 & #2 \\
Row3 & #3 \\
\bottomrule
\end{tabu}
\end{table}


And the result:

-

It is because tabu does not use “real” alternate colors but colorseries provided by package xcolor.

\documentclass{article}
\usepackage{tabu,booktabs}
\usepackage[table]{xcolor}

\begin{document}

\noindent
\definecolor{lightb}{RGB}{217,224,250}
\begin{table}
\begin{tabu}{>{\bfseries}lX[l]}
\toprule
\taburowcolors[1]3{lightb..white}
Row1 & 1 \\
Row2 & 2 \\
Row3 & 3 \\
\bottomrule
\end{tabu}
\end{table}
\end{document}


Changing to \taburowcolors[1]4{lightb..white} gives

\documentclass{article}
\usepackage{tabu,booktabs}
\usepackage[table]{xcolor}

\begin{document}

\noindent
\definecolor{lightb}{RGB}{217,224,250}
\begin{table}
\begin{tabu}{>{\bfseries}lX[l]}
\toprule
\taburowcolors[1]4{lightb..white}
Row1 & 1 \\
Row2 & 2 \\
Row3 & 3 \\
Row4 & 4 \\
Row5 & 5 \\
\bottomrule
\end{tabu}
\end{table}
\end{document}


# Coloring with table option of xcolor

If you want alternating rows between two colors (lightb and white) as said in the comment, you may go with xcolor and its table coloring.:

\documentclass{article}
\usepackage{tabu,booktabs}
\usepackage[table]{xcolor}
%\definecolor{oddrowcolor}{rgb}{0.961,1.000,0.980}
%\definecolor{evenrowcolor}{rgb}{0.902,0.902,0.980}
%\definecolor{white}{rgb}{1.0,1.0,1.0}
\usepackage{booktabs}

\begin{document}

\noindent
\definecolor{lightb}{RGB}{217,224,250}

\begin{table}
\rowcolors{1}{lightb}{white}%
\begin{tabu}{>{\bfseries}lX[l]}
\toprule
%\taburowcolors[1]4{lightb..white}
Row1 & 1 \\
Row2 & 2 \\
Row3 & 3 \\
Row4 & 4 \\
Row5 & 5 \\
\bottomrule
\end{tabu}
\end{table}
\end{document}


-
Thank you for answering, but if I want alternating rows between two colors (lightb and white) ? – regisk7 Dec 25 '12 at 12:30
Are there big differences? – regisk7 Dec 25 '12 at 12:45
@regisk7: See the update using xcolor. – Harish Kumar Dec 25 '12 at 14:45