Using ConTeXt and Metapost, it is fairly easy to define spot colors and use them in an image:
\starttext
\definecolor[MyRed][c=0,m=1,y=1,k=0]
\definespotcolor[RedSpot][MyRed][p=1,e=MyRed]
\startMPpage
draw unitsquare scaled 10cm;
fill fullcircle scaled 8cm shifted(5cm,5cm) withcolor \MPcolor{RedSpot};
setbounds currentpicture to boundingbox currentpicture enlarged 2mm;
\stopMPpage
\stoptext
The PDF color channels may be separated using GhostScript and then summarized using ImageMagick's montage
utility:
gs -dBATCH -dNOPAUSE -sDEVICE=tiffsep -r300 -sOutputFile=separation.tif <output pdf>
montage -label "%f" -density 300 <output pdf> *.*.tif -geometry 600 output.png
NOTE: There is a bug in GhostScript 9.0 -- 9.02 that breaks the tiffsep device by making it unable to load color profiles
The resulting summary shows that the PDF consists of a black frame and a circle that occupies a spot channel:
A similar effect can be achieved using XColor and PS-Tricks:
\begin{filecontents*}{spot_color.pro}
TeXDict begin
/RedSpotCMYK [0 1 1 0] def
/RedSpotSpot (RedSpot) def
/RedSpotDef RedSpotCMYK aload pop RedSpotSpot findcmykcustomcolor def
/XC@RedSpot{RedSpotDef 1.0 setcustomcolor}XCdef
end
\end{filecontents*}
\documentclass{minimal}
\usepackage[prologue]{xcolor}
\usepackage{pstricks}
\usepackage[tightpage,active,psfixbb]{preview}
\setlength\PreviewBorder{2mm}
\PreviewEnvironment{pspicture}
\definecolor{RedSpot}{cmyk}{0 1 1 0}
\begin{document}
\begin{pspicture}
\psframe (0,0) (10cm,10cm)
\pscircle[fillcolor=RedSpot,fillstyle=solid,linestyle=none] (5cm,5cm){4cm}
\end{pspicture}
\end{document}
Compiled with LaTeX and converted to PDF:
latex pstricks_spot
dvips -h tex.pro -h xcolor.pro -h spot_color.pro pstricks_spot
ps2pdf pstricks_spot.ps
This gives a similar color separation:
However, if I try to swap TikZ for PSTricks in the above process:
\begin{filecontents*}{spot_color.pro}
TeXDict begin
/RedSpotCMYK [0 1 1 0] def
/RedSpotSpot (RedSpot) def
/RedSpotDef RedSpotCMYK aload pop RedSpotSpot findcmykcustomcolor def
/XC@RedSpot{RedSpotDef 1.0 setcustomcolor}XCdef
end
\end{filecontents*}
\documentclass{minimal}
\usepackage[prologue]{xcolor}
\usepackage{tikz}
\usepackage[tightpage,active,psfixbb]{preview}
\setlength\PreviewBorder{2mm}
\PreviewEnvironment{tikzpicture}
\definecolor{RedSpot}{cmyk}{0 1 1 0}
\begin{document}
\begin{tikzpicture}[x=1cm,y=1cm]
\draw (0,0) rectangle (10,10);
\fill[color=RedSpot] (5,5) circle (4);
\end{tikzpicture}
\end{document}
NOTE: TikZ 2.10 is broken when combined with the Preview package and dvips
The red circle no longer occupies a separate channel:
Therefore, my question is:
Given that XColor can enable spot colors for PSTricks graphics and TikZ also uses XColor, is it possible to use spot colors in TikZ graphics?
If so, I will be asking a follow-up question about doing so without rendering through Postscript (i.e using pdflatex
instead of latex
/dvips
/ps2pdf
)