1

I am preparing a manuscript for print. I am not a typesetter and now fairly little about printing in general. I have read that CMYK is typically the preferred format for printing (as it refers to pigment mixing). RGB on the other hand is used for digital representations. With that in mind I set

\usepackage[cmyk]{xcolor} 

I also define some custom colours. These are taken from another manuscript, which defined them as RGB colours. My question is whether xcolor does some smart converting from RGB to CMYK, or should I (for the best printed presentation) provide CMYK colours instead of these RGB ones?

\definecolor{cb-blue}{RGB}{68,140,203}
\definecolor{cb-orange}{RGB}{247,148,29}
7
  • No, xcolor only has very simplistic conversion from RGB to CMYK and you should not rely on it for colour critical work. However, your problems won't just go away because you provide CMYK colours as what you see on screen will still likely not match what will be printed. In the end you have two options: 1) decide not to care about colour and make do with the approximation of your pdf reader, or 2) invest a significant amount of time learning how colour works, while making sure your printer can guarantee colour from a fully colour managed workflow. Commented Jan 20, 2021 at 9:51
  • @DavidPurton Would it make sense to find the color that I like in RGB (as displayed on my screen) and then use an online converter to convert that RGB to CMYK? I am aware that at that stage the colors on my screen will be different than how they will be printed. Commented Jan 20, 2021 at 11:08
  • @BramVanroy in every stage of that workflow you'd still rely on a colour being printed like it is shown on screen, something you can't rely on.
    – Skillmon
    Commented Jan 20, 2021 at 11:45
  • @BramVanroy, I've not found an online colour converter that lets you specify source and destination colour profiles. Most would use desktop software for this. In the open source world, your best option is Scribus. But although this might give you a better result than guessing or using conversion without profiles, you still can't be sure what you'll get because 1) your monitor is likely not calibrated and 2) you likely don't know the print conditions of your final output. Commented Jan 22, 2021 at 3:14
  • This post is about going from CMYK to RGB, but the principles are the same: tex.stackexchange.com/a/537274/87678 Commented Jan 22, 2021 at 4:24

1 Answer 1

4

To answer your question, if you use

\usepackage[cmyk]{xcolor}

then all colours will be converted to CMYK regardless of how they are declared.

But xcolor does not do this in a smart way, so you will not get the best possible match to your RGB colour or any indication of whether it is even possible to reproduce your RGB colour in CMYK (the CMYK colour gamut is smaller than RGB).

Sadly, doing what you want isn't as trivial as you might hope. Here's a discussion of some of the issues and options available to you:

I can use Scribus to convert your blue and orange to CMYK. If I do this using it's default sRGB profile and default CMYK profile, which happens to be ISO Coated v2 300% (basICColor) I get the following two CMYK colours:

\definecolor{managed-cmyk-cg-blue}{cmyk}{0.726,0.357,0.018,0.01}
\definecolor{managed-cmyk-cg-orange}{cmyk}{0.015,0.494,0.907,0}

I can also use xcolor to do the conversion:

\convertcolorspec{named}{cg-blue}{cmyk}\tmp
\definecolor{xcolor-cmyk-cg-blue}{cmyk}{\tmp}
\convertcolorspec{named}{cg-orange}{cmyk}\tmp
\definecolor{xcolor-cmyk-cg-orange}{cmyk}{\tmp}

These end up being equivalent to:

\definecolor{xcolor-cmyk-cg-blue}{cmyk}{0.5294,0.24706,0,0.20392}
\definecolor{xcolor-cmyk-cg-orange}{cmyk}{0,0.38824,0.85489,0.03137}

Now's let's have a look at things:

\documentclass{article}

\usepackage{booktabs}
\usepackage{xcolor}

\definecolor{cg-blue}{RGB}{68,140,203}
\definecolor{cg-orange}{RGB}{247,148,29}

\definecolor{managed-cmyk-cg-blue}{cmyk}{0.726,0.357,0.018,0.01}
\definecolor{managed-cmyk-cg-orange}{cmyk}{0.015,0.494,0.907,0}

\newcommand{\col}[1]{%
  \textcolor{#1}{\vrule width 1cm}}

\begin{document}

\convertcolorspec{named}{cg-blue}{cmyk}\tmp
\definecolor{xcolor-cmyk-cg-blue}{cmyk}{\tmp}
\convertcolorspec{named}{cg-orange}{cmyk}\tmp
\definecolor{xcolor-cmyk-cg-orange}{cmyk}{\tmp}

\begin{tabular}{@{}llll@{}}
  \toprule
  & RGB & \texttt{xcolor} CMYK & Managed CMYK \\
  \midrule
  Blue & \col{cg-blue} & \col{xcolor-cmyk-cg-blue} & \col{managed-cmyk-cg-blue} \\
  Orange & \col{cg-orange} & \col{xcolor-cmyk-cg-orange} & \col{managed-cmyk-cg-orange} \\
  \bottomrule
\end{tabular}

\end{document}

And if I convert the resulting PDF to a PNG using the same profiles, I get a colour match with the managed CMYK colours and your original RGB colours, but a colour shift with xcolor's CMYK colours. I made this image with ghostscript where I can specify the RGB and CMYK profiles.

output with GhostScript

But if I open the PDF in my viewer (zathura), things look different because zathura is using a different CMYK profile (and perhaps even a different sRGB profile):

Output from Zathura

Now if I send a PDF to a printer with the CMYK colours in it, I really have no idea what it will look like. Even if the printer just uses the numbers and does nothing else, output depends on all sorts of variables.

If your printer supplies you with a CMYK profile for you to use, then you can use that to convert your RGB colours to CMYK. But unless your monitor is calibrated and you use it's profile, you can't be sure of the conversion back to RGB, so there's still doubt.

I hardly count as a colour expect. I only know enough to understand that there's a lot I don't get. But it seems like the print industry is moving more and more towards an RGB workflow where you work in RGB and provide your file to your printer in RGB tagged with a CMYK output intent. The printer then uses that intent and their own profile to do the final conversion to CMYK. In LaTeX you can do this by using the pdfx package to produce a PDF/X-3 file. I've never done this, and since I don't have a calibrated monitor there isn't much point anyway.

I've only printed with cheap printers that just say "use CMYK" without giving any details. I've printed the same file with the same CMYK colours on different print runs with them and gotten back very different outputs. I'm not doing branding where colour has to be exactly right, so I just put up with generic profiles and not really knowing what I'll get until it comes back.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .