Background: I am using tcolorbox to build my theorem, definition, and example environments. I've been using a shading for the background of these environments, but recently learned that the shading in pgf is hard-coded to RGB, but I have to use CMYK for printing purposes.
pgfplots is capable of doing shading in CMYK colorspace, see here.
Problem: tcolorbox appears to use pgf to do its shading. Is it possible to instead have tcolorbox use pgfplots to do its shading, preferably in an automatic way?
For example, here's an MWE:
\documentclass{article}
\usepackage[cmyk]{xcolor}
\usepackage[many]{tcolorbox}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\tcbset{
definitionstyle/.style={%
enhanced,
interior style={left color=black!2, right color=blue!30}
}
}
\begin{document}
\begin{tcolorbox}[definitionstyle]
Blah blah
\end{tcolorbox}
\end{document}
I'd like to replace the left color=black!2, right color!30 with something like
\begin{tikzpicture}
\begin{axis}[x=1cm,y=1cm,hide axis]
\addplot[surf,mesh/color input=explicit,shader=interp]
table[meta=cdata]{
x y cdata
1 1 color=black!2
2 1 color=blue!30
1 2 color=black!2
2 2 color=blue!30
};
\end{axis}
\end{tikzpicture}
which would do the shading in pgfplots with CMYK colors.

underlaywithtcbclipinterior, but the shading as written outputs in RGB. I tried to replace that with thepgfplotsshading (see the updated question) but it doesn't compile (complains of runaway argument, extra}, pgf math error, illegal unit of measure, etc). – Hayden Jul 26 '17 at 13:19