4

I am working in a cmyk document with package xcolor-material, the issue is a color definitions produce bad color results. For example: the desire color is the left and the exit is the right.

enter image description here

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[cmyk]{xcolor}
\usepackage{xcolor-material}
\usepackage{sectsty}

\sectionfont{\LARGE\normalfont\sffamily\color{MaterialGreen500}}

\begin{document}

\colorsample[HTML]{MaterialGreen500}
\colorsample[cmyk]{MaterialGreen500}

\colorsample[HTML]{MaterialRed500}
\colorsample[cmyk]{MaterialRed500}


\section{Example}
\end{document}
  • Can you show us a MWE? – user36296 May 27 '17 at 15:17
  • where did you get the numbers from? the cmyk values are not as I'd expect eg for the second one this convertor gives different 0,.73,.78,.04 colorhexa.com/f44336 – David Carlisle May 27 '17 at 15:27
  • 1
    @DavidCarlisle My guess would be the conversion if from xcolour: \documentclass{article} \usepackage{xcolor} \begin{document} \convertcolorspec{HTML}{4CAF50}{cmyk}\tmp \definecolor{MaterialGreen}{cmyk}{\tmp} \tmp \end{document} – user36296 May 27 '17 at 16:07
1

With the colour conversion algorithm of gimp (using the profile "Generic CMYK") instead of the one from xcolor.

Not exactly the same colour, but closer:

\documentclass{article}

\usepackage[cmyk]{xcolor}
\usepackage{xcolor-material}

\definecolor{mygreen}{cmyk}{0.69,0.01,0.82,0.01}
\definecolor{myred}{cmyk}{0.,0.81,0.75,0.}

\begin{document}
\colorsample[cmyk]{mygreen}
\colorsample[HTML]{MaterialGreen500}
\colorsample[cmyk]{MaterialGreen500}

\colorsample[cmyk]{myred}
\colorsample[HTML]{MaterialRed500}
\colorsample[cmyk]{MaterialRed500}

\end{document}

enter image description here

  • Thank, I assuming what is prefer redefine my proper style – Xetam May 28 '17 at 20:24

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.