---
name: "get_palette"
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/get_palette/3alleg4"
---

# get\_palette(3alleg4)

Retrieves the entire palette of 256 colors. Allegro game programming library.

## NAME

get\_palette - Retrieves the entire palette of 256 colors. Allegro game programming library.

## SYNOPSIS

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

**void get\_palette(PALETTE p);**

## DESCRIPTION

Retrieves the entire palette of 256 colors. You should provide an array  of 256 RGB structures to store it in. Example:

```
   PALETTE pal;
   ...
   get_palette(pal);
```

## SEE ALSO

**get\_palette\_range**(3alleg4), **get\_color**(3alleg4), **set\_palette**(3alleg4)
