29.11.2012 Views

MetaFun - Pragma ADE

MetaFun - Pragma ADE

MetaFun - Pragma ADE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

In order to prevent problems, we advise you to stick to RGB color specifications when possible. That<br />

way you not only prevent conversion problems, but also get more predictable results on printing<br />

and viewing devices. However, reality demands that sometimes CMYK colors are used, so how can<br />

we deal with that?<br />

In the METAFUN macro collection there is a macro cmyk that takes four arguments, representing the<br />

cyan, magenta, yellow, and black component.<br />

fill fullsquare xyscaled (10cm,1cm) withcolor cmyk(1,0,.3,.3) ;<br />

If you take a close look at the numbers, you will notice that the cyan component results in a 100%<br />

ink contribution. You will also notice that 30% black ink is added. This means that we cannot<br />

safely convert this color to RGB (r = 1 − c − k < 0) without losing information. Nevertheless the<br />

previous blue bar is presented all right. This is due to the fact that in METAFUN the CMYK colors<br />

are handled as they should, even when METAPOST does not support this color model.<br />

If you use this feature independent of CONTEXT, you need to enable it by setting cmykcolors to<br />

true. You have to convert the resulting graphic to PDF by using for instance the mptopdf suite.<br />

In CONTEXT you can influence this conversion by changing parameters related to color handling:<br />

\setupcolors[cmyk=yes,mpcmyk=no]<br />

Unless you know what you are doing, you don't have to change the default settings (both yes). In<br />

the CONTEXT reference manual you can also read how color reduction can be handled.<br />

Special care should be paid to gray scales. Combining equal quantities of the three color inks will<br />

not lead to a gray scale, but to a muddy brown shade.<br />

fill fullsquare xyscaled (10cm, 2cm) withcolor .5white ;<br />

fill fullsquare xyscaled ( 6cm,1.5cm) withcolor cmyk(.5,.5,.5,0) ;<br />

fill fullsquare xyscaled ( 2cm, 1cm) withcolor cmyk(0,0,0,.5) ;<br />

In figure 3.5 to 3.7 you can see some more colors defined in the CMYK color space. When you<br />

display the screen version of this document, you will notice that the way colors are displayed can<br />

differ per viewer. This is typical for CMYK colors and has to do with the fact that some assumptions<br />

are made with respect to the (print) medium.<br />

c=1 y=.3 k=.3 c=.9 y=.15 c=.25 y=.8 c=.45 y=.1<br />

Figure 3.5 CMYK support disabled, conversion to RGB.<br />

Communicating color Embedded graphics<br />

121

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!