dvipng: Color specials

 
 6.2 Color specials
 ==================
 
 We will describe 'background' first, since it is the simplest.  The
 'background' keyword must be followed by a color specification.  That
 color specification is used as a fill color for the background.  The
 last 'background' special on a page is the one that gets used, and is
 used for the whole of the page image.  (This is possible because the
 prescan phase of dvipng notices all of the color specials so that the
 appropriate information can be written out during the second phase.)
 
    The 'color' special itself has three forms.  The first is just
 'color' followed by a color specification.  In this case, the current
 global color is set to that color; the color stack must be empty when
 such a command is executed.
 
    The second form is 'color push' followed by a color specification.
 This saves the current color on the color stack and sets the color to be
 that given by the color specification.  This is the most common way to
 set a color.
 
    The final form of the 'color' special is just 'color pop', with no
 color specification; this says to pop the color last pushed on the color
 stack from the color stack and set the current color to be that color.
 
    dvipng correctly handles these color specials across pages, even when
 the pages are rendered repeatedly or in reverse order.