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

# select\_palette(3alleg)

Sets the internal palette for color conversion. Allegro game programming library.

## NAME

select\_palette - Sets the internal palette for color conversion. Allegro game programming library.

## SYNOPSIS

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

**void select\_palette(const PALETTE p);**

## DESCRIPTION

Ugly hack for use in various dodgy situations where you need to convert  between paletted and truecolor image formats. Sets the internal palette  table in the same way as the set\_palette() function, so the conversion  will use the specified palette, but without affecting the display  hardware in any way. The previous palette settings are stored in an  internal buffer, and can be restored by calling unselect\_palette(). If you call select\_palette() again, however, the internal buffer will be overwritten.

## SEE ALSO

[**set\_palette**(3alleg)](/set_palette/3alleg.md), [**unselect\_palette**(3alleg)](/unselect_palette/3alleg.md), [**exlights**(3alleg)](/exlights/3alleg.md)
