al_color_linear_to_rgb(3alleg5)

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

✨ NAME ✨

bestie, meet al_color_linear_to_rgb β€” it's part of the Allegro 5 API, and the manual page itself is al_color_linear_to_rgb(3alleg5). yes, the name is a whole mouthful, we move anyway πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro_color.h>

void al_color_linear_to_rgb(float r, float g, float b,
    float *red, float *green, float *blue)

🌸 DESCRIPTION 🌸

okay so picture this: you've got linear sRGB color values and you need them to become gamma corrected β€” aka normal β€” RGB values. that's literally it. that's the whole function. it converts one into the other and minds its own business ✨

here's who's who in the signature:

  • float r, float g, float b β€” the linear sRGB color values you're handing over, one float each for red, green, and blue.
  • float *red, float *green, float *blue β€” pointers where the gamma corrected (i.e. normal) RGB values get written. yes bestie, they're pointers. don't forget the & unless you enjoy chaos 😭

πŸ‘‘ SINCE πŸ‘‘

5.2.8 β€” she's been here since 5.2.8, iconic behavior honestly πŸ’–


πŸ¦‹ SEE ALSO πŸ¦‹

  • al_color_linera(3alleg5) β€” yep, spelled exactly like that in the source, no cap, don't come for me πŸ™ˆ
  • al_color_rgb_to_linear(3alleg5) β€” the reverse glow-up, for when you need to go the other way 🫢

and that's the whole page, bestie. this was served fresh from the Allegro reference manual, starring page al_color_linear_to_rgb(3alleg5). go convert something gorgeous. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from