6

I need asymptote to output cmyk figures with only the cyan and black channels used. I've tried the -cmyk option but grayscale colors seem to be coded in the c m and y channels even though I use a pen color like cmyk{0,0,0,.9}. Here is an example:

import three;
size(8cm,0);

currentprojection=perspective(
              camera=(14.2,8.0,7.6),
              zoom=2
);

path3 plan_Oxy= plane((1,0,0), (0,1,0), O);
path3 plan_Oxz = plane((1,0,0), (0,0,1), O);;
path3 plagqsdfn_Oyz = plane((0,1,0), (0,0,1), O);;

pen style_plan = cmyk(0,0,0,0.9);
pen DarkDuotone = cmyk(1,0,0,.4);

draw(surface(plan_Oxy),style_plan,style_plan);
draw(surface(plan_Oxz),style_plan,style_plan);
draw(surface(plan_Oyz),style_plan,style_plan);


path3 axe_Ox = O -- 1*X;
path3 axe_Oy = O -- 1*Y;
path3 axe_Oz = O -- 1*Z;

draw(axe_Ox, DarkDuotone);
draw(axe_Oy, DarkDuotone);
draw(axe_Oz, DarkDuotone);

I compiled with

asy -f pdf -noV -noprc -cmyk EMC-cmyk-pb.asy -o test.pdf and asy -noprc -cmyk EMC-cmyk-pb.asy -o test.eps

and checked the files produced with identify.

test.pdf is indeed in CMYK but there is some magenta and yellow components test.eps is in sRGB.

What should I do to get the grays use only the k channel ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.