29.05.2014 Views

The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE

The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE

The history of luaTEX 2006–2009 / v 0.50 - 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.

XIV<br />

Colors redone<br />

introduction<br />

Color support has been present in ConTEXt right from the start and support has been gradualy<br />

extended, for instance with transparency and spot colors. About 10 years later we<br />

have the rst major rewrite <strong>of</strong> this mechanism using attributes as implemented in LuaTEX.<br />

Because I needed a test le to check if all things still work as expected, I decided to recap<br />

the most important commands in this chapter.<br />

color support<br />

<strong>The</strong> core command is \definecolor, so let's dene a few colors:<br />

\definecolor [red] [r=1]<br />

\definecolor [green] [g=1]<br />

\definecolor [blue] [b=1]<br />

\definecolor [yellow] [y=1]<br />

\definecolor [magenta] [m=1]<br />

\definecolor [cyan] [c=1]<br />

This gives us the following colors:<br />

color name transparency specification<br />

white black red r=1.000 g=0.000 b=0.000<br />

white black green r=0.000 g=1.000 b=0.000<br />

white black blue r=0.000 g=0.000 b=1.000<br />

white black yellow c=0.000 m=0.000 y=1.000 k=0.000<br />

white black magenta c=0.000 m=1.000 y=0.000 k=0.000<br />

white black cyan c=1.000 m=0.000 y=0.000 k=0.000<br />

As you can see in this table, transparency is part <strong>of</strong> a color specication, so let's dene a<br />

few transparent colors:<br />

\definecolor [t-red] [r=1,a=1,t=.5]<br />

\definecolor [t-green] [g=1,a=1,t=.5]<br />

\definecolor [t-blue] [b=1,a=1,t=.5]<br />

color name transparency specification<br />

white black t-red a=1.000 t=<strong>0.50</strong>0 r=1.000 g=0.000 b=0.000<br />

Colors redone 107

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

Saved successfully!

Ooh no, something went wrong!