makecol_depth(3)

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

πŸ’– NAME πŸ’–

okay so bestie, welcome to the Allegro manual page for makecol_depth β€” it converts an RGB value into the specified pixel format. It's giving Allegro game programming library energy, fr fr. πŸ’…

✨ SYNOPSIS ✨

#include <allegro.h>

int makecol_depth(int color_depth, int r, int g, int b);

No cap, that's the whole signature. color_depth, r, g, b β€” all int, all iconic. πŸ‘‘

🌸 DESCRIPTION 🌸

This function is the glow-up translator between two worlds. It takes colors from a hardware independent format β€” red, green, and blue values ranging 0-255 β€” and converts them into the pixel format required by the specified color depth. πŸ¦‹

Example? Bestie, I got you:

/* Compose the green color for 15 bit color depth. */
int green_15bit = makecol_depth(15, 0, 255, 0);

The way that makecol_depth(15, 0, 255, 0) just pulls up with 0 red, 255 green, 0 blue and asks for a 15 bit color depth? Obsessed. πŸ’š

πŸ’« RETURN VALUE πŸ’«

Returns the requested RGB triplet in the specified color depth. That's it, that's the return. Slay. ✨

πŸ‘€ SEE ALSO πŸ‘€


Cute sign-off: this page lives in the Allegro manual, version 4.4.3, and it's makecol_depth(3). If you were looking for a date, bestie, this footer didn't bring one. Mwah, bye. πŸ’–πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from