我正在尝试为 delightful new 包定义背景颜色bookcover
。该包依赖于xcolor
。但是,尽管我定义了一种应该是黄色的颜色,但它似乎打印的是黑色。
以下是 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}
答案1
以下代码不正确:
\definecolor[named]{yellow}{cmyk}{0,24,99,1}
请阅读xcolor包的文档(第10页,表3):
http://mirrors.ctan.org/macros/latex/contrib/xcolor/xcolor.pdf
参数介于 0 和 1 之间:青色、洋红色、黄色、黑色。如果最后一个参数是 1,则颜色为黑色!例如,尝试下一个:
\definecolor{amarillo}{cmyk}{0.4,0.1,0.1,0.1}
答案2
您选择的颜色模型——cmyk
需要相应的颜色规范列表包含 0 到 1 之间的值(或分数):
\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}