1

I don't get the correct colors with the xcolor package. MWE:

\documentclass[12pt,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
% define colors
\definecolor{kitfarbe}{rgb}{0.004,0.588,0.51}
\definecolor{kitorange}{cmyk}{0,.45,1,0}
\definecolor{kitcyan}{cmyk}{90,5,0,0}
\definecolor{kitblau}{cmyk}{80,50,0,0}
\definecolor{kitrot}{cmyk}{25,100,100,0}

\begin{document}
{\color{kitfarbe} This should be turquoise.}\\
{\color{kitorange} This should be orange.}\\
{\color{kitcyan} This should be cyan.}\\
{\color{kitblau} This should be blue.}\\
{\color{kitrot} This should be red.}
\end{document}

The first and second ones are displaied correctly, the third one looks exactly like the 4th, albeit it shouldn't and the last one is simply grey (it is supposed to be red).

1
  • 5
    The cmyk values should be numbers between 0 and 1 Commented Aug 30, 2020 at 14:37

1 Answer 1

2

Ok, dumb question. I found the problem, thanks to Ulrike: \definecolor{...}{rgb}{...} and \definecolor{...}{cymk}{...} only take values in {0, 1}. For rgb one could use \definecolor{...}{RGB}{...} and input {0, 255} color values. So the solution is to simply recalculate the color values. Thanks, I'll try to remember it this time.

You must log in to answer this question.

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