# How to use CMYK-Colors in the whole document

I found out, that my color laser printer prints graphics with gray color in RGB-Representation instead of using black (they are more red then gray). So it seems, that PDFLaTeX is creating RGB-PDF-Files.

I only use pstricks-graphics like this one:

\documentclass[letterpaper,dvips]{article}

\usepackage[utf8]{inputenc}
\usepackage{textcomp}

\usepackage{pst-all}

\usepackage{color}

\begin{document}

\pagestyle{empty}
\begin{TeXtoEPS}
\psset{xunit=1cm,yunit=1cm,runit=1cm}
\begin{pspicture}(2,2)
\psset{linewidth=1pt}

\psframe[fillstyle=solid, linewidth=1pt, fillcolor=lightgray](2,2)

\end{pspicture}

\end{TeXtoEPS}

\end{document}


I'm creating eps-files with this steps:

• latex Grafik1.tex
• dvips Grafik1.dvi -o Grafik1.ps
• ps2eps --ignoreBB Grafik1.ps

and include the eps-file with \includegraphics

So is there a way to tell the whole document only create CMYK-Colors or an other way to create a document with the wright colors?

EDIT: The basic Problem is solved, but when creating a gradient, colors are used instead of black

\documentclass[letterpaper,dvips]{article}

\usepackage[utf8]{inputenc}
\usepackage{textcomp}

\PassOptionsToPackage{cmyk}{xcolor}% NB: put this *before* \usepackage{pst-all}
\usepackage{pst-all}

\begin{document}

\pagestyle{empty}
\begin{TeXtoEPS}
\psset{xunit=1cm,yunit=1cm,runit=1cm}
\begin{pspicture}(2,2)
\psset{linewidth=1pt}

\end{pspicture}

\end{TeXtoEPS}

\end{document}

-
The xcolor package provides the package option cmyk. Also related: PDF colour model and LaTeX –  Qrrbrbirlbel Oct 2 '12 at 14:25
Does including \selectcolormodel{gray} help? –  percusse Oct 2 '12 at 17:59
I edited your second example to put the \PassOptionsToPackage line in the correct place. –  Lev Bishop Oct 2 '12 at 21:57

Drop the \usepackage{color} and load pstricks this way (because pstricks loads xcolor for you already, at the proper moment):

\PassOptionsToPackage{cmyk}{xcolor}
\usepackage{pst-all}

-
Works great - with one exception: gradients. a \psframe with gradient from white to black is created with color instead of black - even if I pass gray'' as xcolor option. –  PascalTurbo Oct 2 '12 at 16:19
@PascalTurbo, edit an example showing the gradient problem into the question and maybe someone can help.... –  Lev Bishop Oct 2 '12 at 17:25
@LevBisop Hi, excuse me for posting this in here (this would be no proper SX question) but...can i do the same with TikZ (seen PGFManual ctan.mirror.garr.it/mirrors/CTAN/graphics/pgf/base/doc/…, pag. 36, lines -8 and -7)? Can I say \PassOptionsToPackage{cmyk}{xcolor} \usepackage{tikz}? –  MattAllegro Nov 9 '14 at 16:55