\documentclass[a4paper]{article}

\usepackage{pgfplots}
\usepackage{pgfplots.assert}

\usepgfplotslibrary{patchplots}

\begin{document}

\makeatletter

{
\pgfplots@check@global@colorspace@overrides

\pgfplotsassertequalstok{rgb}{\pgfkeysvalueof{/pgfplots/mesh/colorspace explicit color output}}{}%
\pgfplotsassertequalstok{auto}{\pgfkeysvalueof{/pgfplots/colormap default colorspace}}{}%
}


\def\checkit#1#2%
{
	\selectcolormodel{#1}
	\pgfplots@check@global@colorspace@overrides
	%
	\pgfplotsassertequalstok{#2}{\pgfkeysvalueof{/pgfplots/mesh/colorspace explicit color output}}{}%
	\pgfplotsassertequalstok{#2}{\pgfkeysvalueof{/pgfplots/colormap default colorspace}}{}%
}

\checkit{rgb}{rgb}

\checkit{RGB}{rgb}

\checkit{gray}{gray}
\checkit{Gray}{gray}

\checkit{cmyk}{cmyk}
\checkit{cmy}{cmyk}

\end{document}

