Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a (pdf|Xe)LaTeX document and trying to keep it CMYK. For some documents, I use a certain color for it's elements, which is RGB #BDCDDA. As my final document should be using the Adobe CMYK profile "CoatedFOGRA39.icc", I need to manually convert that RGB value to e.g. this:

\DefineNamedColor{named}{mycolor}{cmyk}{0.3203,0.1602,0.1172,0.0000}

But, if in the future I want to switch to a different CMYK color profile for maybe another printing company, I have to edit the color definition again, as for example an USWebCoatedSWOP version of RGB #BDCDDA has different CMYK values.

Ideally, I would like to write something like

\DefineNamedColor{named}{mycolor}{/path/to/CoatedFOGRA39.icc}{#BDCDDA}

and have the color auto-converted from RGB (can be considered to be sRGB colorspace) to the correct CMYK value.

Can any LaTeX package help me here, or do I have to set up an external workflow to pre-generate LaTeX snippets with correct CMYK color definitions?

Sidenote: this question is not about embedded figures/pictures, but about using named colors for text and background.

share|improve this question
1  
Would it be an option to include the colors as RGB and post-process your PDF using, e.g., Adobe Acrobat to convert all RGB colors to CMYK using the appropriate profile? (I haven't tested it, but think that it should work.) –  ilpssun Jun 26 '12 at 8:56
    
Post-processing would be an option for me, but not using commercial software. I would need a free tool running on Ubuntu. –  TeXter Jun 26 '12 at 19:27
1  
I had the feeling that tex.stackexchange.com/a/9973/13450 and tex.stackexchange.com/a/99666/13450 are somehow relevant here. –  Christian Feb 25 '13 at 0:21

1 Answer 1

up vote 9 down vote accepted

I think the simplest is to put your definitions in a local package so they can easily be shared between documents and customised to different profiles.

In your document put something like

  \usepackage[CoatedFOGRA39]{mycolor}

if you specify a profile that you have set up, relevant definitions are made, otherwise you get an error. mycolor.sty could look something like this:

\RequirePackage{color}

\DeclareOption{CoatedFOGRA39}{\def\mycolor{CoatedFOGRA39}}
\def\mycolorprofileA{CoatedFOGRA39}
\ProcessOptions\relax

\ifx\mycolor\@undefined
\PackageError{mycolor}{No color profile declared}{declare a color profile}
\fi


\ifx\mycolor\mycolorprofileA
\DefineNamedColor{named}{mycolor}{cmyk}{0.3203,0.1602,0.1172,0.0000}
\fi

The above just declares one colour in one profile, but it could be extended...

share|improve this answer
    
This sounds as a reasonable simple workaround to me if no real ICC handling exists. –  TeXter Jun 26 '12 at 19:29
    
Since there was no better idea proposed, I accepted this workaround as solution. –  TeXter Jul 1 '12 at 6:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.