---
name: "color_map"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/color_map/3alleg4"
---

# color\_map(3alleg4)

Global pointer to the color mapping table. Allegro game programming library.

## NAME

color\_map - Global pointer to the color mapping table. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**extern COLOR\_MAP \*color\_map;**

## DESCRIPTION

Global pointer to the color mapping table. You must allocate your own COLOR\_MAP either statically or dynamically and set color\_map to it  before using any translucent or lit drawing functions in a 256-color  video mode! Example:

```
   color_map = malloc(sizeof(COLOR_MAP));
   if (!color_map)
      abort_on_error("Not enough memory for color map!");
```

## SEE ALSO

**create\_color\_table**(3alleg4), **create\_light\_table**(3alleg4), **create\_trans\_table**(3alleg4), **create\_blender\_table**(3alleg4), **set\_trans\_blender**(3alleg4), **draw\_trans\_sprite**(3alleg4), **draw\_lit\_sprite**(3alleg4), **draw\_gouraud\_sprite**(3alleg4), **drawing\_mode**(3alleg4), **ex3d**(3alleg4), **excolmap**(3alleg4), **exlights**(3alleg4), **exshade**(3alleg4), **extrans**(3alleg4)
