Ideas?
\documentclass{article}
\usepackage[svgnames,table]{xcolor}
\usepackage{array,hhline}
\usepackage[lmargin=1.0in, rmargin=1.0in, tmargin=1in, bmargin=1in]
{geometry}
\begin{document}
\begin{center}
\begin{tabular}%
{>{\raggedright}m{3cm}>{\raggedright}m{2.5cm}>{\raggedright}m{2.5cm}%
>{\raggedright}m{2.5cm}>{\raggedright }m{2.5cm}>{\raggedright }m{2.5cm}|}
\multicolumn{1}{c}{}&\multicolumn{5}{c}{\Large \bfseries
{\color{DodgerBlue} Clean Energy
Technologies and Components}} \tabularnewline
&\cellcolor{Blue}{\color{white} Solar Cells}& \cellcolor{Blue}
{\color{white} Wind Turbines} & %
\multicolumn{2}{c}{\cellcolor{Blue}{\color{white} Vehicles}} &
\cellcolor{Blue}{\color{white}
Lighting} \tabularnewline
\cellcolor{DarkBlue}{\color{white} MATERIAL}&{\color{DarkBlue} PV
films}&
{\color{DarkBlue} Magnets} & {\color{DarkBlue} Magnets} &
{\color{DarkBlue} Batteries} &
{\color{DarkBlue} Phosphors} \tabularnewline \hhline{|~:-|-|-|-|-|}
\cellcolor{Blue}{\color{white} Cerium}&\cellcolor{LightGrey}&
\cellcolor{LightGrey}&
\cellcolor{LightGrey}&\cellcolor{LightGrey} &\cellcolor{LightGrey}
\tabularnewline \hhline{|~:-|-|-|-|-|}
\cellcolor{DarkBlue}{\color{white} Indium}&\cellcolor{LightGrey}&
\cellcolor{LightGrey}&
\cellcolor{LightGrey}&\cellcolor{LightGrey} &\cellcolor{LightGrey}
\tabularnewline \hhline{|~:-|-|-|-|-|}
\cellcolor{DarkBlue}{\color{white} Gallium}&\cellcolor{LightGrey}&
\cellcolor{LightGrey}&
\cellcolor{LightGrey}&\cellcolor{LightGrey} &\cellcolor{LightGrey}
\tabularnewline \hhline{|~:-|-|-|-|-|}
\end{tabular}
\end{center}
\end{document}
First refer to colortbl documentation.
Second it's David Carlisle's job: and David does not like colors !
=> fully buggy !
\columncolor{color}[left overhang]
[right overhang]
overhang is in place of \tabcolsep. Very usefull ! That is if you change
\tabcolsep, you have to change the overhangs parameters !!
\tabcolsep=6pt so here we put overhang=5pt to reduce the area by 1pt.
In tabu package we will say [-1pt] ;-) ie \tabcolsep -1pt !
\tabularnewline is unreadable: use \\ and \arraybackslash
\newcolumntype M[1]{>{\raggedright\arraybackslash
\columncolor{background}[5pt][5pt]%
\noindent\color{foreground}} m{#1mm}}
Well: if you want to change the color just say :
\xglobal\colorlet{foreground}{....}
\xglobal\colorlet{background}{....}
Then the preamble collaspes into:
\begin{tabular}{>{\columncolor{DarkBlue}\noindent\color{white}}M{30}
*5{M{25} |}}
And colortbl is buggy (see the example)
And \hhline is crap ! | does not follow \arrayrulewidth for example
And \cellcolor does not provide the overhang parameters !
With tabu this is :
\tabusetup* {reset,linesep=0pt,everyrow=\noalign{\vskip1mm},
overhang=-1pt }
\begin{tabu} { X [ ^white _DodgerBlue] | *5X[ .9 l LightGrey ] }
\rowfont{\cellcolor{ ^DodgerBlue _white }}
\blankcell &\multicolumn5c{\Large \bfseries
Clean Energy Technologies and Components}
\\ \tabucline{2-}\noalign{\vskip1mm}
\rowfont{\cellcolor {^white _blue }}\blankcell
&Solar Cells &Wind Turbines
&\multicolumn2c{Vehicles} &Lighting
\\
MATERIAL \rowfont{\cellcolor{ ^DarkBlue _white } }
&PV films &Magnets &Magnets
&Batteries &Phosphors
\\
\cellcolor{blue} Cerium & & & & & \\
Indium & & & & & \\
Gallium & & & & &
\\ \hline
\end{tabu}
But I have to finish the implementation ;-)
With tabular, a possible solution with your beloved \hhline ;-)
\newcolumntype
M[1]{>{\raggedright\arraybackslash\columncolor{background}[5pt][5pt]\noindent\color{foreground}}
m{#1mm}}
\colorlet{background}{white}
\colorlet{foreground}{black}
\noindent
\begin{tabular} { >{\columncolor{DarkBlue}\noindent\color{white}} M{30}
*5{M{25} |} }
\cellcolor{white} & \multicolumn5c{\Large
\bfseries{\color{DodgerBlue} Clean Energy Technologies and Components}} \\
\xglobal\colorlet{background}{blue}
\xglobal\colorlet{foreground}{white}
\cellcolor{white} &Solar Cells &Wind Turbines
&\multicolumn2c{\cellcolor{background}\noindent\color{foreground}Vehicles}
& Lighting \\
\cellcolor{DarkBlue}
MATERIAL
\xglobal\colorlet{background}{white}
\xglobal\colorlet{foreground}{DarkBlue}
&PV films &Magnets &Magnets
&Batteries &Phosphors \\ \hhline{|~:-|-|-|-|-|}
\xglobal\colorlet{background}{LightGrey}
\cellcolor{blue}\noindent\color{white}
Cerium & & & &
& \\ \hhline{|~:-|-|-|-|-|}
\cellcolor{DarkBlue}\noindent\color{white}
Indium & & & &
& \\ \hhline{|~:-|-|-|-|-|}
\cellcolor{DarkBlue}\noindent\color{white}
Gallium & & & &
& \\ \hhline{|~:-|-|-|-|-|}
Gallium & & & &
& \\ \hhline{|~:-|-|-|-|-|}
\end{tabular}
Yours sincerely.