[R] RGB -> CYMK, with consistent colors
gm@ne @end|ng |rom kno@o|@co@uk
Wed Dec 2 03:25:33 CET 2020
> However after some testing.
> I totally agree that CMYK handling in R using pdf(..., colormodel = "cmyk")
> is not correct.
Looking at the source code of the function PostScriptSetCol
in file src/librarygrDevices/src/devPS.c
the conversion to CMYK looks correct.
Looking at the generated pdf (qpdf: https://github.com/qpdf/qpdf is
needed to uncompress the pdf)
the numeric color values look correct, although the pdf contents don't exactly
match those generated by PostScriptSetCol
It is possible the problem is in the conversion that occurs when
displaying/printing a pdf.
More information about the R-help