xcolor is used for the colors.
hhline is used for horizontal lines that don't get covered by \cellcolor.
pgf is used for the calculations.
The command \gray is only defined to reduce the amount of \expandafters.
The length \tabwidth is used so that all columns have the same width.
Code
\RequirePackage[table]{xcolor}
\documentclass{article}
\usepackage{array,hhline}
\usepackage{pgf}
\newcommand*{\gray}{gray}
\newcommand*{\woB}[1]{\multicolumn{1}{c}{#1}}
\newcommand*{\colorme}[1]{%
\pgfmathparse{#1<.5?1:0}%
\ifnum\pgfmathresult=0\relax\color{white}\fi
\pgfmathparse{1-#1}
\expandafter\cellcolor\expandafter[\expandafter\gray\expandafter]\expandafter{\pgfmathresult}%
#1%
}
\newlength{\tabwidth}
\settowidth{\tabwidth}{0.00}
\begin{document}
\begin{tabular}{l*6{|>{\centering\arraybackslash}m{\tabwidth}}|}
\woB{} & \woB{hw} & \woB{bx} & \woB{wk} & \woB{jg} & \woB{cl} & \woB{rn} \\ \hhline{~*6{|-}|}
ving & \colorme{1} & 0 & 0 & 0 & 0 & 0 \\ \hhline{~*6{|-}|}
xing & 0 & \colorme{0.92} & \colorme{0.08} & 0 & 0 & 0 \\ \hhline{~*6{|-}|}
king & 0 & \colorme{0.03} & \colorme{0.97} & 0 & 0 & 0 \\ \hhline{~*6{|-}|}
ging & 0 & 0 & 0 & \colorme{1} & 0 & 0 \\ \hhline{~*6{|-}|}
ping & 0 & 0 & 0 & 0 & \colorme{1} & 0 \\ \hhline{~*6{|-}|}
ning & 0 & 0 & 0 & 0 & 0 & \colorme{1} \\ \hhline{~*6{|-}|}
\end{tabular}
\end{document}
Output
