[Tex/LaTex] Row colour gaps in tabularx with \aboverulesep and \{}

colorrowcolortablestabularx

table color

\documentclass[]{article}
\usepackage[table,dvipsnames]{xcolor}
\usepackage{multicol,booktabs,tabularx}

% Table settings
\renewcommand{\aboverulesep}{1pt}
\renewcommand{\belowrulesep}{1pt}

\begin{document}
    \begin{tabularx}{\textwidth}{@{}X l@{}}
        This is Header 1 & This is Header 2 \\
        \toprule
        \rowcolor{Apricot}
        This is Text 1 & This is Text 2 \\\midrule
        This is Text 1 & This is Text 2 \\\midrule
        This is Text 1 & This is Text 2 \\
        \bottomrule
    \end{tabularx}
\end{document}

I have the above table MWE using tabularx, and I am trying to colour the row from the table. However, due to the use of my \aboverulesep and \belowrulesep, I now have gaps above and below my table row that is not coloured.

Also, because of the use of my @{} on either side of the table to 'remove' the excess padding on the sides of the table, the row colour is being applied in those padding as well.

Qn 1: How can I colour the aforementioned gaps (arising due to the \aboverulesep) in, while maintaining the rule separation?

Qn 2: How to remove the colour from the two sides of the table?


EDIT

This is in response to Zarko's answer. I want to maintain the use of @{} on either side to remove the padding. If I were to adapt this into your answer, like so:

% @Zarko's answer
\documentclass{article}
\usepackage[table,dvipsnames]{xcolor}
\usepackage{booktabs, cellspace, tabularx}

% Table settings
\renewcommand{\aboverulesep}{0pt}
\renewcommand{\belowrulesep}{0pt}
\setlength\cellspacetoplimit{5pt}
\setlength\cellspacebottomlimit{5pt}

\begin{document}
    \begin{tabularx}{\textwidth}{@{}SX Sl@{}}% <-- S is append for activate additional vertical space 
        This is Header 1 & This is Header 2 \\
        \toprule
        \rowcolor{Apricot}
        This is Text 1 & This is Text 2 \\\midrule
        This is Text 1 & This is Text 2 \\\midrule
        This is Text 1 & This is Text 2 \\
        \bottomrule
    \end{tabularx}
\end{document}

I obtain this: enter image description here

and so my second question (Qn2) is still unresolved.. For Qn 1, I prefer to use the solution by @Skillmon with \renewcommand{\arraystretch}{1.15} as I need not add a new package.

Best Answer

One of possibilities is to use cellspace package:

enter image description here

First the vertical space around booktabs rules i reduced to zero pt, than is increased by macro \cellspacetoplimit and \cellspacebottomlimit to desired vertical (colored) gap:

\documentclass{article}
\usepackage[table,dvipsnames]{xcolor}
\usepackage{booktabs, cellspace, tabularx}

% Table settings
\renewcommand{\aboverulesep}{0pt}
\renewcommand{\belowrulesep}{0pt}
\setlength\cellspacetoplimit{5pt}
\setlength\cellspacebottomlimit{5pt}

\begin{document}
   \begin{tabularx}{\textwidth}{SX Sl}% <-- S is append for activate additional vertical space 
        This is Header 1 & This is Header 2 \\
        \toprule
    \rowcolor{Apricot}
        This is Text 1 & This is Text 2 \\\midrule
        This is Text 1 & This is Text 2 \\\midrule
        This is Text 1 & This is Text 2 \\
        \bottomrule
    \end{tabularx}
\end{document}

Addendum: works around to second part of question. It need to introduce fake column (or to have zero distance between columns or white space with width of two \tabcolsep):

enter image description here

This time without additional package but with tricks how to use \rowcolor (for details see documentation for package colortbl):

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

% Table settings
\renewcommand{\aboverulesep}{0pt}
\renewcommand{\belowrulesep}{0pt}

\begin{document}
\setlength\tabcolsep{0pt}
\renewcommand\arraystretch{1.2}
   \begin{tabularx}{\textwidth}{ X c<{\hspace{12pt}} l }
        This is Header 1 && This is Header 2 \\
        \toprule
    \rowcolor{Apricot}%[0pt]
        This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is && This is Text 2 \\\midrule
        This is Text 1 && This is Text 2 \\\midrule
        This is Text 1 && This is Text 2 \\
        \bottomrule
    \end{tabularx}
\end{document}

Addendum (2): After four years ... Now I would use new table package tabularray. Using it for the MWE in above addendum is code simpler:

\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{booktabs}

\begin{document}
\noindent
    \begin{tblr}{colspec = {@{} X[1,l]  l @{}},
                 column{1} = {rightsep=12pt},
                 row{2} = {bg=Apricot},
                 }
This is Header 1 &  This is Header 2    \\
    \toprule
This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1 This is Text 1
                & This is Text 2        \\
    \midrule 
This is Text 1  & This is Text 2        \\
    \midrule
This is Text 1  & This is Text 2        \\
    \bottomrule
    \end{tblr}
\end{document}

enter image description here