Can fontspec be used to manage a document's fonts if the fonts need to use the CMYK color model? The fontspec documentation, section 6.1, says that fontspec uses RGB colors. My experimentation (MWE below) seems to confirm that fontspec will convert CMYK colors passed to it into noticeably different RGB equivalents.
PDF output of MWE (using XeLaTeX, fontspec, xcolor):
MWE:
\documentclass[a4paper]{article}
\usepackage{fontspec}
\usepackage{xcolor}
\definecolor{mycyan}{cmyk}{1,0,0,0}
\definecolor{mymagenta}{cmyk}{0,1,0,0}
\definecolor{myyellow}{cmyk}{0,0,1,0}
\definecolor{myblack}{cmyk}{0,0,0,1}
\begin{document}
Without fontspec:
\textcolor{mycyan}{\rule{10pt}{10pt}}
\textcolor{mycyan}{XXX Cyan text (CMYK 1,0,0,0)}
\textcolor{mymagenta}{\rule{10pt}{10pt}}
\textcolor{mymagenta}{XXX Magenta text (CMYK 0,1,0,0)}
\textcolor{myyellow}{\rule{10pt}{10pt}}
\textcolor{myyellow}{XXX Yellow text (CMYK 0,0,1,0)}
\textcolor{myblack}{\rule{10pt}{10pt}}
\textcolor{myblack}{XXX Black text (CMYK 0,0,0,1)}
With fontspec:
\textcolor{mycyan}{\rule{10pt}{10pt}}
\fontspec[Color=mycyan]{Arial} XXX Cyan text (CMYK 1,0,0,0)
\textcolor{mymagenta}{\rule{10pt}{10pt}}
\fontspec[Color=mymagenta]{Arial} XXX Magenta text (CMYK 0,1,0,0)
\textcolor{myyellow}{\rule{10pt}{10pt}}
\fontspec[Color=myyellow]{Arial} XXX Yellow text (CMYK 0,0,1,0)
\textcolor{myblack}{\rule{10pt}{10pt}}
\fontspec[Color=myblack]{Arial} XXX Black text (CMYK 0,0,0,1)
\end{document}
\textcolor
?\textcolor{mycyan}{\fontspec{Arial} XXX Cyan text (CMYK 1,0,0,0)}
is working fine. (Leaving aside, that it would be better to set the document font globally in the preamble, instead of switching adhoc inside of\textcolor
) – DG' Nov 2 '18 at 23:02