---
name: "ggiSetGCBackground"
section: "3ggi"
platform: "linux"
package: "libggi2-dev"
version: "1:2.0.1-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/ggiSetGCForeground/3ggi"
---

# ggiSetGCBackground(3ggi)

Set or get the foreground and background colors used in drawingoperations in a visual

Part of [ggiSetGCForeground(3ggi)](/ggiSetGCForeground/3ggi.md).

## NAME

ggiSetGCForeground, ggiGetGCForeground, ggiSetGCBackground, ggiGetGCBackground - Set or get the foreground and background colors used in drawingoperations in a visual

## SYNOPSIS

**#include \<ggi/ggi.h\>**

**int ggiSetGCForeground(ggi\_visual\_t** *vis***, ggi\_pixel** *color***);**

**int ggiGetGCForeground(ggi\_visual\_t** *vis***, ggi\_pixel \****color***);**

**int ggiSetGCBackground(ggi\_visual\_t** *vis***, ggi\_pixel** *color***);**

**int ggiGetGCBackground(ggi\_visual\_t** *vis***, ggi\_pixel \****color***);** .SH "DESCRIPTION"

**ggiSetGCForeground** and **ggiGetGCForeground** set or reads the current colors for the foreground, used in all normal drawing functions.

**ggiSetGCBackground** and **ggiGetGCBackground** set or reads the current colors for the background, used in two-color operations like drawing text.

## RETURN VALUE

All four functions 0 for OK.
