1

TeXnicians, How to convert RGB to equivalent CMYK color value from RGB color values? Please find MWE file as follows:

\documentclass[draft]{book}
\usepackage{color,}

\definecolor{rgbcolor}{rgb}{0.686,0.059,0.569}
%\definecolor{cmykcolor}{cmyk}{0, 0, 0, 0}


\begin{document}
\textcolor{rgbcolor}{This is RGB color}

%\textcolor{cmykcolor}{This is Equivalent for converted RGB to CMYK color}

\end{document}
5

1 Answer 1

2

You can use xcolor package

\documentclass[draft]{book}
\usepackage{xcolor}

\definecolor{rgbcolor}{rgb}{0.686,0.059,0.569} %\definecolor{cmykcolor}{cmyk}{0, 0, 0, 0}
\convertcolorspec{named}{rgbcolor}{cmyk}\tmp
\definecolor{cmykcolor}{cmyk}{\tmp}
\begin{document}
    \textcolor{rgbcolor}{This is RGB color}

    \textcolor{cmykcolor}{This is Equivalent for converted RGB to CMYK color}.
    The computed values are: \tmp.
\end{document}
8
  • We created PDF file rgbcolor and cmykcolor shows complete different color.
    – Rajesh N
    Jan 5, 2021 at 8:01
  • 1
    Sure! adventureswithart.com/convert-rgb-to-cmyk
    – NBur
    Jan 5, 2021 at 8:02
  • Above link show near same, but in PDFLaTeX shows complete different color
    – Rajesh N
    Jan 5, 2021 at 8:05
  • I need values of CMYK
    – Rajesh N
    Jan 5, 2021 at 8:07
  • 1
    You should read the xcolor documentation, subsection 6.3.1 p. 47 and subsection 6.3.2 p. 50 (in version 2.12). It seems you can adjust some parameters…
    – NBur
    Jan 5, 2021 at 8:31

You must log in to answer this question.

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