al_color_html(3)
π NAME π
al_color_html β Allegro 5 API. Also hi bestie: this is al_color_html(3) from the Library Functions Manual, and we're about to decode hex colors like it's nothing π
β¨
π SYNOPSIS π
#include <allegro5/allegro_color.h>
ALLEGRO_COLOR al_color_html(char const *string)
π DESCRIPTION π
okay so al_color_html takes an HTML-style hex number β like #00faff β and interprets it as a color. The accepted format is literally the same as al_color_html_to_rgb(3), no cap.
It returns the interpreted color, or al_map_rgba(0, 0, 0, 0) if the string could not be parsed. That's the fallback, bestie.
β οΈ Note: the behaviour on invalid strings is different from Allegro 5.0.x. So if you're time-traveling to 5.0.x, do not expect the same invalid-string vibe check, okay? π«Ά
π₯ SEE ALSO π₯
mwah π β this page comes from the Allegro reference manual, and there is literally no date listed in the footer, so no fake date from me πβ¨
π¦ 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