fontspec icon indicating copy to clipboard operation
fontspec copied to clipboard

CMYK colours don't display properly

Open ArTourter opened this issue 13 years ago • 1 comments
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.

ArTourter avatar Mar 12 '12 02:03 ArTourter

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.

u-fischer avatar May 18 '22 09:05 u-fischer