---
name: "create_rgb_table"
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/create_rgb_table"
---

# create\_rgb\_table(3alleg)

Generates an RGB mapping table with lookup data for a palette. Allegro game programming library.

## NAME

create\_rgb\_table - Generates an RGB mapping table with lookup data for a palette. Allegro game programming library.

## SYNOPSIS

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

**void create\_rgb\_table(RGB\_MAP \*table, const PALETTE pal,** **void (\*callback)(int pos));**

## DESCRIPTION

Fills the specified RGB mapping table with lookup data for the specified  palette. If the callback function is not NULL, it will be called 256  times during the calculation, allowing you to display a progress  indicator. Example:

```
   RGB_MAP rgb_table;
   create_rgb_table(&rgb_table, palette, NULL);
   rgb_map = &rgb_table;
```

## SEE ALSO

[**rgb\_map**(3alleg)](/rgb_map/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)
