Based on this answer you know how to easily create rows with background colors. This also works for booktabs.
Edit: This is how it looks by default with \begin{tabular}{lccc}:

But we want to change that…
So there is a problem if you intend to use @{}.
@{} makes the table a little smaller at the left and right side and it looks very professional.
Usually… Because with colored rows, it does not, because they (horizontally) "overflow" the table.
Here is an example:
\documentclass{article}
\usepackage{array,graphicx}
\usepackage{booktabs}
\usepackage[dvipsnames, table]{xcolor}
\begin{document}
\begin{table} \centering
\rowcolors{1}{white}{yellow}
\begin{tabular}{@{}l ccc@{}}
& Head & Head & Head \\
\cmidrule{1-4}
line 1 & Y & N & Y \\
line 2 & Y & N & Y \\
line 3 & Y & N & Y \\
line 4 & Y & N & Y \\
\rowcolor{red}
line 5 & Y & N & Y \\
\cellcolor{green}%
line 6 & Y & N &
\cellcolor{green}%
Y \\
\cmidrule{1-4}
\end{tabular}
\end{table}
\end{document}


{lccc}it is the@{}that make things tricky. That usually looks better anyway rather than have thelinetext flush to the edge of the colour panel. – David Carlisle Aug 29 '20 at 12:07