select_palette(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– select_palette β€” the Allegro manual, but make it slay πŸ’–

okay bestie, gather round, because we're talking about select_palette(3) from the Allegro manual / Allegro game programming library, and honestly? she's a little chaotic but we love her. πŸŽ€


✨ NAME ✨

select_palette β€” sets the internal palette for color conversion. πŸ’… (yes, that's the whole vibe. Allegro game programming library, as always.)


🌸 SYNOPSIS 🌸

#include <allegro.h>

void select_palette(const PALETTE p);

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie: this one is, and I quote the source energy here, an ugly hack β€” for use in various dodgy situations where you need to convert between paletted and truecolor image formats. 😭 no cap, she's built for the messy moments.

What she does: she sets the internal palette table in the same way as the set_palette() function, so your conversion will use the specified palette... but β€” and this is the iconic part β€” without affecting the display hardware in any way. πŸ‘‘

The previous palette settings get stored in an internal buffer, and you can restore them by calling unselect_palette(). 🫢

⚠️ but listen. if you call select_palette() again, the internal buffer will be overwritten. so don't be out here stacking calls and then wondering where your old palette went. πŸ’€

🌈 SEE ALSO 🌈


and that's the whole page, bestie!! πŸ’– go forth and convert those palettes responsibly, mwah 😘

this has been Allegro, version 4.4.3 β€” stan her, she's been holding it down forever. bye babes! πŸŽ€βœ¨πŸ¦‹πŸ’…

πŸ“¦ where this page comes from