An ePiX output file achieves color through the pstcol style, an amalgamation of color and PSTricks styles. There are three available color models: rgb, cmyk (cyan, magenta, yellow, and black), and named (primary colors only). An rgb color is specified by three numbers between 0 (no color) and 1 (full saturation), each of which represents the density of a primary color (red, green, and blue respectively). A cmyk color is similarly set by giving four densities. Finally, a primary color (r, g, or b; c, m, or y; black and white) may be specified by name, with an optional density.
rgb(1, 0, 1); // magenta cmyk(0,1,0,0); // same thing magenta(); // method III rgb(1, 0.7, 0.7); // light red rgb(0.4, 0, 0); // dark red red(0.4); // same thingLike all parameters, color densities can depend on variables. Values that lie outside the interval
The fill() command causes closed paths to be gray-shaded, using
PostScript specials. The depth of gray ranges from 0 (white)
to 1 (black), and defaults to . The command gray(0.4) sets
the depth to
. Filling is deactivated by the command
fill(false). The order of filled objects in the source file is
significant, because ePiX writes its output in the same order, and
PostScript has no transparency. Layering, hidden object removal, and
color shading are discussed in Chapters 3 and
4.