al_map_rgb(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ NAME ✨

al_map_rgb β€” it's giving Allegro 5 API πŸ’–


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

ALLEGRO_COLOR al_map_rgb(
   unsigned char r, unsigned char g, unsigned char b)

πŸŽ€ DESCRIPTION πŸŽ€

okay bestie so listen πŸ‘‘ β€” this one takes your r, g, b values (they range from 0 to 255, no cap) and converts them into an ALLEGRO_COLOR(3alleg5) for you. The way it does that? It just uses 255 for alpha. Full opacity, zero drama, main character energy only πŸ’…

And here's the cute part: you can call this function before Allegro is initialized. Like, it doesn't need Allegro to be up and running first. Iconic behavior honestly πŸ¦‹βœ¨


πŸ’œ SEE ALSO πŸ’œ


and that's the whole page, bestie 🫢 this little beauty lives in the Allegro reference manual (yes, the al_map_rgb(3alleg5) one, iykyk) β€” go forth and color things, you absolute legend πŸŒˆπŸ’–

πŸ“¦ where this page comes from