XSetForeground(display, gc, foreground)
      Display *display;
      GC gc;
      unsigned long foreground;
| display | Specifies the connection to the X server. | 
| gc | Specifies the GC. | 
| foreground | Specifies the foreground you want to set for the specified GC. | 
| BadAlloc | The server failed to allocate the requested source or server memory. | 
| BadGC | A value for a GContext argument does not name a defined GContext. |