---
name: "rgb_map"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/rgb_map"
---

# rgb\_map(3alleg)

Look up table to speed up reducing RGB values to palette colors. Allegro game programming library.

## NAME

rgb\_map - Look up table to speed up reducing RGB values to palette colors. Allegro game programming library.

## SYNOPSIS

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

**extern RGB\_MAP \*rgb\_map;**

## DESCRIPTION

To speed up reducing RGB values to 8-bit paletted colors, Allegro uses a  32k lookup table (5 bits for each color component). You must set up this  table before using the gouraud shading routines, and if present the table  will also vastly accelerate the makecol8() and some create\_\*\_table() functions. RGB tables can be precalculated with the rgbmap utility, or generated at runtime with create\_rgb\_table().

## SEE ALSO

[**create\_rgb\_table**(3alleg)](/create_rgb_table/3alleg.md), [**makecol8**(3alleg)](/makecol8/3alleg.md), [**create\_trans\_table**(3alleg)](/create_trans_table/3alleg.md), [**create\_light\_table**(3alleg)](/create_light_table/3alleg.md), [**create\_color\_table**(3alleg)](/create_color_table/3alleg.md), [**ex3d**(3alleg)](/ex3d/3alleg.md), [**excolmap**(3alleg)](/excolmap/3alleg.md), [**exrgbhsv**(3alleg)](/exrgbhsv/3alleg.md), [**exshade**(3alleg)](/exshade/3alleg.md), [**extrans**(3alleg)](/extrans/3alleg.md)
