I'm trying to color a single cell in smallmatrix, but it seems to me that the \cellcolor doesn't work in smallmatrix:
\documentclass{article}
\usepackage{amsmath} %smallmatrix
\usepackage[table]{xcolor} %cellcolor
\begin{document}
\[
\left(\begin{array}{cc}
\cellcolor{gray}1&2
\end{array}\right)
\quad
\left(\begin{smallmatrix}
\cellcolor{gray}1&2
\end{smallmatrix}\right)
\]
\end{document}
You can see that the array is colored as desired while in smallmatrix \cellcolor doesn't do anything.
Does anyone know how to do color cells in smallmatrix?