How to remove extra black line coming in table due to hhline

Using the code given below, I am getting a black line over the word "Methods" due to hhline. How shall I remove this black line or make it of same color as the background color so that it is not visible?

\documentclass{article}
\usepackage{hhline}
\usepackage[table]{xcolor}
\usepackage{array}
\usepackage{hhline}
\usepackage{multirow}
\definecolor{babyblue}{rgb}{0.54, 0.81, 0.94}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}
\begin{document}
\begin{table}[]
\centering
\setlength\arrayrulewidth{1.3pt}
\footnotesize\setlength{\tabcolsep}{2.7 pt}
\renewcommand{\arraystretch}{1.4}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
\cellcolor{aliceblue}  & \multicolumn{2}{c|}{\cellcolor{babyblue}ISE} & \multicolumn{2}{c|}{\cellcolor{babyblue}IAE} & \multicolumn{2}{c|}{\cellcolor{babyblue}ITAE} \\ \hhline{-|-|-|-|-|-|-|} \cline{2-7}
\multirow{-2}{*}{\cellcolor{aliceblue} Methods}
& \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%     & \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%      & \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%       \\ \hhline{-|*6-}
\rowcolor{babyblue}ABC                                                           & 0.5645      & 0.63     & 1.8       & 1.8      & 6.1       & 6.6       \\ \hhline{-|*6-}
\rowcolor{aliceblue}XYZ                                                            & 2.1       & 2.3      & 0.881       & 9.82      & 9.2       & 28.9       \\ \hhline{-|*6-}
\rowcolor{babyblue}MNO                                                                & 0.68      & 0.97     & 1.62       & 1.61      & 8.9       & 8.2       \\ \hhline{-|*6-}
\rowcolor{aliceblue} PQR                                                                 & 0.65       & 0.753     & 2.064       & 2.231      & 28.04       & 28.56       \\ \hhline{-|*6-}
\end{tabular}
\end{table}
\end{document}


You need to change your used command \hhline{-|-|-|-|-|-|-|} to \hhline{|~|-|-|-|-|-|-|} (see the ~ at the first position marking there should be no line).

So the following MWE

\documentclass{article}

\usepackage{hhline}
\usepackage[table]{xcolor}
\usepackage{array}
\usepackage{multirow}

\definecolor{babyblue}{rgb}{0.54, 0.81, 0.94}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}

\begin{document}

\begin{table}[]
\centering
\setlength\arrayrulewidth{1.3pt}
\footnotesize\setlength{\tabcolsep}{2.7 pt}
\renewcommand{\arraystretch}{1.4}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
\cellcolor{aliceblue}  & \multicolumn{2}{c|}{\cellcolor{babyblue}ISE} & \multicolumn{2}{c|}{\cellcolor{babyblue}IAE} & \multicolumn{2}{c|}{\cellcolor{babyblue}ITAE} \\
\hhline{|~|-|-|-|-|-|-|} % <==========================================
\multirow{-2}{*}{\cellcolor{aliceblue}Methods}
& \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%     & \cellcolor{aliceblue}-20\%        & \cellcolor{aliceblue}+20\%      & \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%        \\ \hhline{-|*6-}
\rowcolor{babyblue}ABC                                                           & 0.5645      & 0.63     & 1.8       & 1.8      & 6.1       & 6.6       \\ \hhline{-|*6-}
\rowcolor{aliceblue}XYZ                                                            & 2.1       & 2.3      & 0.881       & 9.82      & 9.2       & 28.9       \\ \hhline{-|*6-}
\rowcolor{babyblue}MNO                                                                & 0.68      & 0.97     & 1.62       & 1.61      & 8.9       & 8.2       \\ \hhline{-|*6-}
\rowcolor{aliceblue} PQR                                                                 & 0.65       & 0.753     & 2.064       & 2.231      & 28.04       & 28.56       \\ \hhline{-|*6-}
\end{tabular}
\end{table}
\end{document}


results in the following table:

Because you do not want to get rid of the lines I deleted the second table.

To get rid of the underlaying white line under text "Method" you need to change the command \hhline{|~|-|-|-|-|-|-|} to

\hhline{|>{\arrayrulecolor{aliceblue}}->{\arrayrulecolor{black}}|-|-|-|-|-|-|}


Please see that this code prints the first part of line (marked with - again; ~ adds the white line!) and colored it in the same color the background has.

With the following MWE

\documentclass{article}

\usepackage{hhline}
\usepackage[table]{xcolor}
\usepackage{array}
\usepackage{multirow}
\usepackage{booktabs}

\definecolor{babyblue}{rgb}{0.54, 0.81, 0.94}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}

\begin{document}

\begin{table}[ht]
\centering
\setlength\arrayrulewidth{1.3pt}
\footnotesize\setlength{\tabcolsep}{2.7 pt}
\renewcommand{\arraystretch}{1.4}
\begin{tabular}{|c|c|c|c|c|c|c|}
\hline
\cellcolor{aliceblue}  & \multicolumn{2}{c|}{\cellcolor{babyblue}ISE} & \multicolumn{2}{c|}{\cellcolor{babyblue}IAE} & \multicolumn{2}{c|}{\cellcolor{babyblue}ITAE} \\
\hhline{|>{\arrayrulecolor{aliceblue}}->{\arrayrulecolor{black}}|-|-|-|-|-|-|} % <==========================================
\multirow{-2}{*}{\cellcolor{aliceblue}Methods}
& \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%     & \cellcolor{aliceblue}-20\%        & \cellcolor{aliceblue}+20\%      & \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%        \\ \hhline{-|*6-}
\rowcolor{babyblue}ABC                                                           & 0.5645      & 0.63     & 1.8       & 1.8      & 6.1       & 6.6       \\ \hhline{-|*6-}
\rowcolor{aliceblue}XYZ                                                            & 2.1       & 2.3      & 0.881       & 9.82      & 9.2       & 28.9       \\ \hhline{-|*6-}
\rowcolor{babyblue}MNO                                                                & 0.68      & 0.97     & 1.62       & 1.61      & 8.9       & 8.2       \\ \hhline{-|*6-}
\rowcolor{aliceblue} PQR                                                                 & 0.65       & 0.753     & 2.064       & 2.231      & 28.04       & 28.56       \\ \hhline{-|*6-}
\end{tabular}
\end{table}

\end{document}


you get the result:

• Horizontal and vertical lines are necessary in this case for me. Yes, that white line should be removed. Either it should be no line or line color should merge with background so that it is not visible. How to do that
– ShJ
Feb 28, 2019 at 19:52
• @ShiS To get the \hhline right colored (without withe line behind "Method") use command \hhline{|>{\arrayrulecolor{aliceblue}}->{\arrayrulecolor{black}}|-|-|-|-|-|-|}. See updated answer. Feb 28, 2019 at 20:24
• +1 for answer. however, i would prefer table without colored rows, or exceptional only in table body but without vertical and horizontal lines. well people have different taste (fortunately :-) ) Feb 28, 2019 at 20:34
• @Zarko I thought about using the color for the columns instead the vertical lines. Different taste :-) Feb 28, 2019 at 20:36

i would redesign your table as follows:

\documentclass{article}
\usepackage{siunitx}
\usepackage[table]{xcolor}
\definecolor{babyblue}{rgb}{0.54, 0.81, 0.94}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}
\usepackage{booktabs, multirow}
\newcommand\mcc[1]{\multicolumn{2}{c}{#1}}

\begin{document}

\begin{table}[htb]
\centering
\renewcommand\arraystretch{1.2}
\rowcolors{2}{white}{aliceblue}
\begin{tabular}{c *{6}{S} }
\toprule
& \mcc{ISE} & \mcc{IAE} & \mcc{ITAE}                \\
\cmidrule(lr){2-3}\cmidrule(lr){4-5}\cmidrule(lr){6-7}
\multirow{-2.3}{*}{Methods}
& {$-20\%$} & {$+20\%$}
& {$-20\%$} & {$+20\%$}
ABC & 0.5645 & 0.63   & 1.8    & 1.8   & 6.1   & 6.6    \\
XYZ & 2.1    & 2.3    & 0.881  & 9.82  & 9.2   & 28.9   \\
MNO & 0.68   & 0.97   & 1.62   & 1.61  & 8.9   & 8.2    \\
PQR & 0.65   & 0.753  & 2.064  & 2.231 & 28.04 & 28.56  \\
\end{NiceTabular}
\end{table}
\end{document}


You need several compilations (because nicematrix uses PGF/Tikz nodes under the hood).