To set the foreground of a given GC, use XSetForeground().
To set the background of a given GC, use XSetBackground().
To set the display function in a given GC, use XSetFunction().
To set the plane mask of a given GC, use XSetPlaneMask().