2

I am using tcolorboxes with grey frames for examples in my PhD thesis. It will be printed professionally and the sample print I received shows inconsistent colors. The tcolorboxes are created identically with a grey frame \definecolor{framegrey}{cmyk}{0,0,0,0.15}.

However when inspecting the PDF with Acrobat Professional I see that on some pages the grey frame is defined with the correct cmyk color (0,0,0,0.15), on other pages it is set with a different cmyk color (0.09,0.07,0.07,0)! These pages tend to have colorful pixel graphics inside the tcolorbox.

The framecolors looks identical on the screen, the resulting colors in print are different!

Does anybody know how to get consistent colors from LaTeX?

  • \usepackage[cmyk]{xcolor} does not solve the problem
  • colframe=white!85!black results in similar problems

I cannot give a minimal working example at the moment, as I don't know what exactly is producing this behaviour.

The two colors look very similar.

wrong color in tcolorbox

Additional information

I found out, that compiling the document on Fedora 30 results in the above problem, while compiling it on Debian Stretch yields correctly defined framegrey in CMYK.

I did check the tikz version as suggested in the comments, but both systems have version 3.0.1a installed (< version 3.1.3).

Here you find a list of all differences in the tex environment on both systems:

--- Fedora 30
+++ Debian Stretch
[...]
   xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
    color.cfg    2016/01/02 v1.6 sample color configuration
-  pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex
+  pdftex.def    2017/01/12 v0.06k Graphics/color for pdfTeX
+infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
+ ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
[...]
-graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
+graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)
-graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
+graphics.sty    2016/10/09 v1.0u Standard LaTeX Graphics (DPC,SPQR)
[...]
-fancyhdr.sty    2017/06/30 v3.9a Extensive control of page headers and footers
-multicol.sty    2018/04/20 v1.8s multicolumn formatting (FMi)
+fancyhdr.sty    2016/09/06 3.8 Extensive control of page headers and footers
+multicol.sty    2016/04/07 v1.8p multicolumn formatting (FMi)
[...]
-inputenc.sty    2018/04/06 v1.3b Input encoding file
-microtype.sty    2018/01/14 v2.7a Micro-typographical refinements (RS)
-microtype-pdftex.def    2018/01/14 v2.7a Definitions specific to pdftex (RS)
-microtype.cfg    2018/01/14 v2.7a microtype main configuration file (RS)
-mathtools.sty    2018/01/08 v1.21 mathematical typesetting tools
-    calc.sty    2017/05/25 v4.3 Infix arithmetic (KKT,FJ)
- mhsetup.sty    2017/03/31 v1.3 programming setup (MH)
+inputenc.sty    2015/03/17 v1.2c Input encoding file
+    utf8.def    2017/01/28 v1.1t UTF-8 support for inputenc
+   t1enc.dfu    2017/01/28 v1.1t UTF-8 support for inputenc
+  ot1enc.dfu    2017/01/28 v1.1t UTF-8 support for inputenc
+  omsenc.dfu    2017/01/28 v1.1t UTF-8 support for inputenc
+microtype.sty    2016/05/14 v2.6a Micro-typographical refinements (RS)
+microtype-pdftex.def    2016/05/14 v2.6a Definitions specific to pdftex (RS)
+microtype.cfg    2016/05/14 v2.6a microtype main configuration file (RS)
+mathtools.sty    2015/11/12 v1.18 mathematical typesetting tools
+    calc.sty    2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
+ mhsetup.sty    2010/01/21 v1.2a programming setup (MH)
[...]
-pgfplots.sty    2018/03/28 v1.16 Data Visualization (1.16)
+pgfplots.sty    2016/08/10 v1.14 Data Visualization (1.14)
     tikz.sty    2015/08/07 v3.0.1a (rcs-revision 1.151)
      pgf.sty    2015/08/07 v3.0.1a (rcs-revision 1.15)
   pgfrcs.sty    2015/08/07 v3.0.1a (rcs-revision 1.31)
[...]
-pdftexcmds.sty    2018/01/30 v0.27 Utility functions of pdfTeX for LuaTeX (HO)
-infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
- ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
-   ifpdf.sty    2017/03/15 v3.2 Provides the ifpdf switch
+pdftexcmds.sty    2016/05/21 v0.22 Utility functions of pdfTeX for LuaTeX (HO)
+   ifpdf.sty    2016/05/14 v3.1 Provides the ifpdf switch
[...]
-pgfplotstable.sty    2018/03/28 v1.16 Table typesetting and Pretty-printing (1.
-16)
-   array.sty    2018/04/30 v2.4h Tabular extension package (FMi)
+pgfplotstable.sty    2016/08/10 v1.14 Table typesetting and Pretty-printing (1.
+14)
+   array.sty    2016/10/06 v2.4d Tabular extension package (FMi)
[...]
- caption.sty    2018/05/01 v3.3-147 Customizing captions (AR)
-caption3.sty    2018/05/27 v1.8a caption3 kernel (AR)
+ caption.sty    2016/02/21 v3.3-144 Customizing captions (AR)
+caption3.sty    2016/05/22 v1.7-166 caption3 kernel (AR)
[...]
-algorithm2e.sty    2017/07/18 v5.2 algorithms environments
-ifoddpage.sty    2016/04/23 v1.1 Conditionals for odd/even page detection
+algorithm2e.sty    2013/01/06 v5.00 algorithms environments
[...]
-tcolorbox.sty    2018/07/26 version 4.14 text color boxes
+tcolorbox.sty    2016/11/18 version 3.96 text color boxes
[...]
-etoolbox.sty    2018/02/11 v2.5e e-TeX tools for LaTeX (JAW)
-  xparse.sty    2018-05-12 L3 Experimental document command parser
-   expl3.sty    2018-06-14 L3 programming layer (loader) 
-expl3-code.tex    2018-06-14 L3 programming layer 
-l3pdfmode.def    2018-06-14 v L3 Experimental driver: PDF mode
+etoolbox.sty    2017/01/02 v2.4 e-TeX tools for LaTeX (JAW)
+  xparse.sty    2016/11/21 v6760 L3 Experimental document command parser
+   expl3.sty    2016/11/21 v6760 L3 programming layer (loader) 
+expl3-code.tex    2016/11/21 v6760 L3 programming layer 
+l3pdfmode.def    2016/08/18 v6679 L3 Experimental driver: PDF mode
[...]
- siunitx.sty    2018/05/17 v2.7s A comprehensive (SI) units package
-l3keys2e.sty    2018-05-12 LaTeX2e option processing using LaTeX3 keys
-translator.sty    2018/01/04 v1.12 Easy translation of strings in LaTeX
-hyperref.sty    2018/02/06 v6.86b Hypertext links for LaTeX
+ siunitx.sty    2017/01/01 v2.7a A comprehensive (SI) units package
+l3keys2e.sty    2016/11/21 v6760 LaTeX2e option processing using LaTeX3 keys
+translator.sty    2010/06/12 ver 1.10
+translator-language-mappings.tex
+hyperref.sty    2016/06/24 v6.83q Hypertext links for LaTeX
[...]
-  pd1enc.def    2018/02/06 v6.86b Hyperref: PDFDocEncoding definition (HO)
+  pd1enc.def    2016/06/24 v6.83q Hyperref: PDFDocEncoding definition (HO)
[...]
- hpdftex.def    2018/02/06 v6.86b Hyperref driver for pdfTeX
+ hpdftex.def    2016/06/24 v6.83q Hyperref driver for pdfTeX
[...]
-  ts1enc.dfu    2018/04/05 v1.2c UTF-8 support for inputenc
+  ts1enc.dfu    2017/01/28 v1.1t UTF-8 support for inputenc
[...]
-siunitx-abbreviations.cfg    2017/11/26 v2.7k siunitx: Abbreviated units
+siunitx-abbreviations.cfg    2017/01/01 v2.7a siunitx: Abbreviated units
18
  • 1
    Can you share some code, that exhibits this behaviour? – DG' Nov 16 '19 at 20:31
  • 1
    @Schrödinger'scat cmyk uses four values (for c=cyan, m=magenta,y=yellow,k=black). – Ulrike Fischer Nov 16 '19 at 22:17
  • 3
    This looks like the problem described in this answer. – Sveinung Nov 16 '19 at 22:33
  • 1
    @UlrikeFischer from this site seem that there is degeneracy. cmyk=(0.02,0,0,0.07) is the same as cmyk=(0.09,0.07,0.07,0) – vi pa Nov 16 '19 at 23:21
  • 1
    @Sveinung is probably right, but we need a MWE to be sure. But the good news is that tikz now supports CMYK shadings if you are using at least version 3.1.3. If you are stuck with earlier versions, then pgf-cmykshadings will help you. See the other answer in the linked question. – David Purton Nov 17 '19 at 9:53
1

This question can be divided in sub-questions:

  1. How do I create a document for professional printing?
  2. How do I eliminate the differences between compiling a document in Fedora30 and Debian Stretch?

As a preferred Windows user I can only directly answer #1: You should create a document that directly complies to one of the PDF/X standards. As long as you want one document for the archives/libraries and for print, this standard should be PDF/X-4 and the base colour model should be CMYK. (PFD/X-1 is paper-only, PDF/X-3 is the outdated version of PDF/X-4.) A minimal example of PDF/X you can find in this answer.

Minimal working examples (MWE) take a while to create but they are incredibly useful. Does the problem persist when you compile the MWE fom above augmented by colour? In MikTeX with normal coloured text I do not see this behaviour.

I see your packages are outdated. Update your distribution to the latest version.

You do not specify how in Acrobat you read the colour values. There is no colour picker in Acrobat. The correct way to check is with the Output Preview of the Print Production tool. Select the OutputIntent as your simulation profile and choose only Process Color. Is your text visible? If yes, it's OK. An alternative way is to set \pdfobjcompresslevel=0, \pdfcompresslevel=0 and edit the file in a text editor. You should find the values 0 0 0 .15 if the colours were correctly written to PDF.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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