fontspec
fontspec copied to clipboard
CMYK colours don't display properly
trafficstars
there seems to be a problem when using the xcolor package with the cmyk options. Specify the colour as a fontspec option gives a different result to using the \color{} command. The following MWE is provided as a demo:
\documentclass{article}
\usepackage[cmyk]{xcolor}
%\definecolor{Headings}{rgb}{0.00,0.34,0.65}
\definecolor{Headings}{cmyk}{0.54,0.31,0,0.42}
\usepackage{fontspec}
\setsansfont[Color=Headings]{Iwona}
\begin{document}
{\color{Headings}\bfseries TEST TEXT}
{\sffamily\bfseries TEST TEXT}
\end{document}
replacing the cmyk option for xcolor with rgb, both text appear the same colour.
the raw font feature expects RGB values (in hex/html notation), so fontspec has to convert to this model. cmyk colors would need support in luaotfload and the xetex engine.