[R] CMYK color space

Henrik Bengtsson hb at biostat.ucsf.edu
Wed Sep 14 01:24:06 CEST 2011


Did you ask your question being aware of the following from
help("pdf") in R v2.13.1:

<quote>
pdf(file = ifelse(onefile, "Rplots.pdf", "Rplot%03d.pdf"),
    width, height, onefile, family, title, fonts, version,
    paper, encoding, bg, fg, pointsize, pagecentre, colormodel,
    useDingbats, useKerning, fillOddEven, maxRasters)

Arguments:
...
colormodel	:
a character string describing the color model: currently allowed
values are "rgb", "gray" and "cmyk". Defaults to "rgb".

Color models:
The default color model is sRGB, and model "gray" maps sRGB colors to
greyscale using perceived luminosity (biased towards green). "cmyk"
outputs in CMYK colorspace. The simplest possible conversion from sRGB
to CMYK is used
(http://en.wikipedia.org/wiki/CMYK_color_model#Mapping_RGB_to_CMYK).

Raster images are output in RGB under the "gray" and "cmyk" models.
</quote>

My $.02

/Henrik

On Tue, Sep 13, 2011 at 3:28 PM, ivo welch <ivo.welch at gmail.com> wrote:
> dear R experts---I am struggling with the requirements to prepare my files
> for my printers.  I am printing in 2/2 format, which means cyan and black
> for me, which they take from my color-separated pdf files.  R comes into
> play, because it produces all the figures that are embedded in my book
> (pdflatex).
>
> now, TeX has no problems producing CMYK files.  However, R produces RGB
> files (for Cairo-device pdf files).  The problem is that cyan in R's RGB  is
> (0,255,255), and unfortunately when this is converted into CMYK, and from
> then into color-separated plates (using adobe acrobat), it maps not into
> 100% cyan, but into much [but not full] CMYK cyan and a little bit of
> yellow.
>
> there was a discussion of this about 10 years ago on r-help, when it was
> still not possible.  are there any hacks that get R to output CMYK pdf
> files?  I don't need it to be general.  I just need the cyan color to map
> perfectly.
>
> I wonder whether I should switch to the tikzDevice.  (I know it exists, but
> I have not used it yet.  is it reliable and is it reasonably well comparable
> to pdf device capabilities)
>
> advice appreciated.
>
> sincerely,
>
> /ivo welch
>
> ----
> Ivo Welch (ivo.welch at gmail.com)
> http://www.ivo-welch.info/
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list