# xcolor showing black with bookcover

I'm trying to define a background color for the delightful new bookcover package. The package relies on xcolor. However, even though I define a color that should be yellow, it seems to print black.

Here's a MWE:

\documentclass[coverwidth=130mm,coverheight=185mm,
spinewidth=13mm,bleedwidth=5mm]{bookcover}
\definecolor[named]{yellow}{cmyk}{0,24,99,1}
\begin{document}
\begin{bookcover}
%% Background Color
\bookcovercomponent{color}{bg whole}{color=yellow}
%    \bookcovercomponent{picture}{front}{v2gimp.jpg}
%  \bookcovercomponent{picture}{back}{park.jpg}
%%The class bookcover requires the services of the class article
%%and    the following packages: kvoptions, geometry, graphicx, calc,
%%xcolor, ifthen, tikz, eso-pic, textpos.
\end{bookcover}
\end{document}

• Both of the below answers are correct. How do I select the answer? Dec 10 '16 at 16:46

The following code is not correct: \definecolor[named]{yellow}{cmyk}{0,24,99,1}

http://mirrors.ctan.org/macros/latex/contrib/xcolor/xcolor.pdf

The parameters are between 0 and 1: cyan, magenta, yellow, black. If the last parameter is 1, then the color is black! Try the next one for example:

\definecolor{amarillo}{cmyk}{0.4,0.1,0.1,0.1}

Your choice of the colour model - cmyk - requires the corresponding colour specification list to contain values between 0 and 1 (or fractions):

\documentclass[
coverwidth  = 130mm,
coverheight = 185mm,
spinewidth  =  13mm,
bleedwidth  =   5mm]{bookcover}

\definecolor[named]{yellow}{cmyk}{0,.24,.99,.01}

\begin{document}

\begin{bookcover}
\bookcovercomponent{color}{bg whole}{color=yellow}
\end{bookcover}

\end{document}

• I get the following error: "Package xcolor Error: Undefined color model CMYK'. Dec 10 '16 at 7:43
• I get the following error: "Package xcolor Error: Undefined color model CMYK'. I tried adding \selectcolormodel{CMYK} and \selectcolormodel{cmyk} and neither compiled. I can't compile your MWE without getting the error. Dec 10 '16 at 8:08
• If I change "cmyk" to "rgb" (with different values, of course) it compiles. Unfortunately I need cmyk output. Dec 10 '16 at 9:04
• The error in your answer was you left my mistake in, you have to change the integers to percentages by adding decimal points. Now it works. Dec 10 '16 at 9:12
• @user26732: I've updated the answer. I was confused with the rgb & RGB models provided by xcolor which function in that way. See Table 3: Supported color models in the xcolor documentation, where it lists the parameter range for cmyk as being [0,1].
– Werner
Dec 10 '16 at 17:20