\documentclass{minimal}
\usepackage{amsmath}
\usepackage[active,tightpage]{preview}
\setlength\PreviewBorder{1pt}
\usepackage{pgf}
\usepackage{tikz}
\usepgfmodule{plot}
\usepgflibrary{plothandlers}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{shadings}
\begin{document}
\begin{preview}
%tikz
\begin{tikzpicture}[every node/.style={draw,scale=1pt,
minimum width=20pt,inner sep=3pt,
line width=0pt,draw=black}]
\matrix[row sep=2pt,column sep=2pt]
{\node[]{31};&
\node[]{32};&
\node[fill=blue]{33};&
\node[]{34};&
\node[left color=-green,right color=black!80]{35};&
\node[fill=blue]{36};&
\node[]{37};&
\node[]{38};&
\node[fill=blue]{39};&
\node[fill=-green]{40};\\
\node[left color=blue,right color=black!80]{21};&
\node[]{22};&
\node[]{23};&
\node[fill=blue]{24};&
\node[fill=-green]{25};&
\node[]{26};&
\node[fill=blue]{27};&
\node[fill=black!80]{28};&
\node[]{29};&
\node[left color=blue,right color=-green]{30};\\
\node[]{11};&
\node[fill=blue]{12};&
\node[]{13};&
\node[fill=black!80]{14};&
\node[left color=blue,right color=-green]{15};&
\node[]{16};&
\node[]{17};&
\node[fill=blue]{18};&
\node[]{19};&
\node[fill=-green]{20};\\
\node[]{1};&
\node[]{2};&
\node[fill=blue]{3};&
\node[]{4};&
\node[fill=-green]{5};&
\node[fill=blue]{6};&
\node[fill=black!80]{7};&
\node[]{8};&
\node[fill=blue]{9};&
\node[fill=-green]{10};\\
};
\end{tikzpicture}
\end{preview}
\end{document}