Color table rows and columns

unfortunately coloring of rows and columns in table doesn't has option for transparency of row colors (as far as i know). so it should be imitated by \cellcolor with appropriate color. for example like this:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[table]{xcolor}
\newcommand\ccg[1]{\cellcolor{gray!30!red!30}{#1}} % for cells in second column 
                                                   % and gray colored rows
\newcommand\ccw[1]{\cellcolor{red!15}{#1}}         % for cells in  second column 
                                                   % white colored rows

\begin{document}
\rowcolors{1}{white}{gray!30}
    \begin{tabular}{c c c}
        a   & \ccw{b}   & c     \\
        \hline
        1   & \ccg{2}   & 3     \\
        4   & \ccw{5}   & 6     \\
        7   & \ccg{8}   & 9     \\
    \end{tabular}
\end{document}

enter image description here

Tags:

Color

Tables