---
name: "ggiGetGamma"
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/ggiSetGamma/3ggi"
---

# ggiGetGamma(3ggi)

Manipulate the gamma maps and the gamma correction of a visual

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

## NAME

ggiSetGammaMap, ggiGetGammaMap, ggiSetGamma, ggiGetGamma - Manipulate the gamma maps and the gamma correction of a visual

## SYNOPSIS

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

**int ggiSetGammaMap(ggi\_visual\_t** *vis***,**  **int** *s***, int** *len***,**  **ggi\_color \****gammamap***);**

**int ggiGetGammaMap(ggi\_visual\_t** *vis***,**  **int** *s***, int** *len***,**  **ggi\_color \****gammamap***);**

**int ggiSetGamma(ggi\_visual\_t** *vis***,** **ggi\_float** *r***,**  **ggi\_float** *g***,**  **ggi\_float** *b***);**

**int ggiGetGamma(ggi\_visual\_t** *vis***,**  **ggi\_float \****r***,**  **ggi\_float \****g***,**  **ggi\_float \****b***);** .SH "DESCRIPTION"

Some truecolor modes on some hardware can use the DAC's palette to lookup the values before sending to the monitor. Generally this is used for gamma correction by filling the lookup table with a curve, hence the name "gamma map", but it could be used for other things e.g. special effects in games.

**ggiSetGammaMap** and **ggiGetGammaMap** sets or gets the gamma map, for *len* colors starting at *s*.

**ggiSetGamma** and **ggiGetGamma** sets or gets the gamma correction for the visual.

## RETURN VALUE

All four functions 0 for OK, otherwise an error code.
