In my article, I am trying to apply a color for a row in the table, when I am using \extracolsep\fill to fit the table to the text width, the rowcolor is splitted wherever the extra space added by a \extracolsep\fill. Is it possible to get the color shade without split by the automated way?
I am having lot of table in my article, I need to align the numbers by decimal, so I have added dcolumn.sty also. How can we get this color shaded without splitted by the automated way? Any trick is available?
Here is the MWE:
\documentclass{article}
\usepackage{dcolumn}
\usepackage[table,dvips]{xcolor}
\usepackage{showframe}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\begin{document}
\rowcolors{2}{gray!35}{gray!70}
\begin{table}
\begin{tabular*}{\textwidth}{@{\extracolsep\fill}d{3,0}d{2,0}d{3,0}d{2,0}d{2,0}d{3,0}d{3,0}d{3,0}}
\hline
\rowcolor{blue!50}128&64&32&16&8&400&200&100\\
\hline
1 &0 &1 &1 &0 &1 &0 &1\\\hline
1 &0 &100 &1 &0 &1 &0 &1\\\hline
100 &0 &52 &1 &0 &1 &0 &1\\\hline
1 &0 &1 &1 &0 &1 &0 &1\\\hline
\end{tabular*}
\end{table}
\end{document}
I am getting this output:


\rowcolors{2}{gray!35}{gray!70}from xcolor package to get the alternative color for a row, the above solution we need to go and give the command by the manual way in each and every row, and this solution is not working for a para align mode when the column is breaking a two or more line – RCV Feb 18 '17 at 02:54@{}'s in the tabular 'preamble'. when I am using the@{}the color shade is going beyond the table width – RCV Feb 18 '17 at 03:02