# RGB to CMYK equivalent color

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}

• The xcolor package has conversion commands. Jan 5, 2021 at 7:52
• Please show the page number or macros for conversion Jan 5, 2021 at 7:57
• @UlrikeFischer you posted first: I can remove my answer.
– NBur
Jan 5, 2021 at 7:58
• @NBur there's no need to remove it. It's fine. Jan 5, 2021 at 8:02
• Feb 6, 2021 at 13:02

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}

• We created PDF file rgbcolor and cmykcolor shows complete different color. Jan 5, 2021 at 8:01
• – NBur
Jan 5, 2021 at 8:02
• Above link show near same, but in PDFLaTeX shows complete different color Jan 5, 2021 at 8:05
• I need values of CMYK Jan 5, 2021 at 8:07
• 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