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

# get\_color(3alleg)

Retrieves the specified palette entry. Allegro game programming library.

## NAME

get\_color - Retrieves the specified palette entry. Allegro game programming library.

## SYNOPSIS

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

**void get\_color(int index, RGB \*p);**

## DESCRIPTION

Retrieves the specified palette entry. Example:

```
   RGB color;
   ...
   get_color(11, &color);
```

## SEE ALSO

[**get\_palette**(3alleg)](/get_palette/3alleg.md), [**set\_color**(3alleg)](/set_color/3alleg.md)
