When space on either side of a table is removed with @{}, then the color added with \rowcolors will expand beyond the width of the table. In the answer provided to a similar question, this is fixed by putting @{\kern\tabcolsep} instead of @{}. But that's equivalent to just removing @{} from the code, so I don't really consider that a solution. Is there another way to limit the row colors to the widt of the tabel?
\documentclass{article}
\usepackage[table]{xcolor}
\begin{document}
\rowcolors{2}{}{gray}
\begin{tabular}{@{}*4{l}@{}}
\hline
1 & 2 & 3 & 4\\
5 & 6 & 7 & 8\\
1 & 2 & 3 & 4\\
5 & 6 & 7 & 8\\
\end{tabular}
\end{document}


