al_color_html_to_rgb(3)
π 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:
#RRGGBBRRGGBB
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