al_color_html_to_rgb(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– NAME πŸ’–

okay so this is al_color_html_to_rgb from the Library Functions Manual β€” it's Allegro 5 API, bestie, and it's here to turn HTML-style hex strings into RGB floats. slay.


✨ SYNOPSIS ✨

#include <allegro5/allegro_color.h>

bool al_color_html_to_rgb(char const *string,
   float *red, float *green, float *blue)

πŸŽ€ DESCRIPTION πŸŽ€

So what it does is interpret an HTML-style hex number (like #00faff) as a color. That's the whole main character move. πŸ’…

The only accepted formats are:

  • #RRGGBB
  • RRGGBB

where R, G, and B are hexadecimal digits [0-9A-Fa-f]. No cap, that's literally it.

It returns true on success and false on failure. 😭 And on failure, all components are set to zero β€” so yeah, zeroed out, not left vibing.

Note: the behaviour on invalid strings is different from Allegro 5.0.x.

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ“ that's the whole vibe check, bestie πŸ“ β€” source/version is Allegro reference manual, and the footer doesn't list a date, so there's no date to spill. πŸ’–βœ¨ periodt βœ¨πŸ’–

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms