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:

 %% 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.
  • Both of the below answers are correct. How do I select the answer?
    – user26732
    Dec 10 '16 at 16:46

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

Please read the document of xcolor package (page 10, Table3):


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:



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

enter image description here

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



  \bookcovercomponent{color}{bg whole}{color=yellow}

  • I get the following error: "Package xcolor Error: Undefined color model `CMYK'.
    – user26732
    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.
    – user26732
    Dec 10 '16 at 8:08
  • If I change "cmyk" to "rgb" (with different values, of course) it compiles. Unfortunately I need cmyk output.
    – user26732
    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.
    – user26732
    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

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.