al_unmap_rgba(3alleg5)
β¨ al_unmap_rgba β Allegro 5 API β¨
okay bestie, welcome to al_unmap_rgba(3alleg5) from the Allegro 5 API π this is the one that cracks open a color and hands you back its four little numbers, one by one. it's giving reverse-glow-up and honestly? obsessed.
π SYNOPSIS
#include <allegro5/allegro.h>
void al_unmap_rgba(ALLEGRO_COLOR color,
unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a)
like. that's it. that's the whole vibe. one color in, four pointers out π«Ά
π DESCRIPTION
so here's the tea: this function retrieves the components of an ALLEGRO_COLOR(3alleg5) π¨ you hand it a color, and it unpacks that color into its red, green, blue and alpha pieces for you.
each of those components will range from 0-255 β that's the classic byte-scale situation, no decimals, no fractions, just clean whole numbers fr fr π₯
and the bestie bonus? this function can be called before Allegro is initialized β¨ like, no setup era required, you can just call it whenever. iconic behavior honestly.
heads up:r,g,bandaare allunsigned char *β pointers, bestie. so make sure those point at somewhere real before you call this, or it's gonna be a bad time π
π SEE ALSO
that's the whole page, and it lives in the Allegro reference manual, filed under al_unmap_rgba(3alleg5) πΈ go forth and unmap your colors, you main character π¦π
π periodt π
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms