I want to modify this code to change the cell color instead of font color automatically according to the number in the cell.
\documentclass{article}
\usepackage{xcolor}
\usepackage{pgf}
\usepackage{collcell}
\usepackage{adjustbox}
\usepackage{multirow}
\usepackage{pdflscape}
\usepackage{booktabs}
\usepackage{colortbl}
% This selects the amount of color to use
\newcommand*{\MinNumber}{0}%
\newcommand*{\MaxNumber}{100}%
\newcommand{\ApplyGradient}[1]{
\pgfmathsetmacro{\PercentColor}{100.0*(#1-\MinNumber)/(\MaxNumber-\MinNumber)}
\textcolor{black!\PercentColor}{#1}
}
\newcolumntype{R}{>{\collectcell\ApplyGradient}{r}<{\endcollectcell}}
\begin{document}
\begin{table}{
\begin{tabular}{ c R R R R R R R R}
\toprule
\multicolumn{1}{c} {Tools} &
\multicolumn{1}{c} {D1} &
\multicolumn{1}{c} {D2} &
\multicolumn{1}{c} {D3} &
\multicolumn{1}{c} {D4} &
\multicolumn{1}{c} {D5} &
\multicolumn{1}{c} {D6} &
\multicolumn{1}{c} {D7} &
\multicolumn{1}{c} {D8} \\
A & 70 & 80.81 & 54.5 & 100 & 51 & 88& 99 & 90\\
B & 66 & 99 & 73 & 88 & 66 & 59& 88 & 60\\
\toprule
\end{tabular}
}{}
\end{table}
\end{document}