[pgf-tikz] RGB colour model for plain TeX users
Jim Diamond
JimDiamond at ns.sympatico.ca
Sat Nov 9 01:54:09 CET 2019
On Sat, Nov 9, 2019 at 11:30 (+1300), Henri Menke wrote:
> Dear Jim,
> Thanks for the suggestion. I've opened a new issue on GitHub for it
> and added it to the roadmap for the next release.
> https://github.com/pgf-tikz/pgf/issues/772
Hi again Henri,
I will also put this on github, but a couple of minutes of playing
around gave me
\def\pgfutil at emu@cmyk#1#2,#3,#4,#5\@nil
{
\pgfmathsetmacro{\@red@}{(1 - #2) * (1 - #5)}%
\pgfmathsetmacro{\@green@}{(1 - #3) * (1 - #5)}%
\pgfmathsetmacro{\@blue@}{(1 - #4) * (1 - #5)}%
\expandafter\edef\csname\string\color@#1\endcsname
{\noexpand\xcolor@ {}{}{rgb}{\@red@,\@green@,\@blue@}}
}
I realize that converting cmyk to rgb is a lot more contentious than
converting RGB to rgb, but in case anyone aside from me thinks this is
more useful than harmful, ...
Cheers.
Jim
More information about the pgf-tikz
mailing list