al_color_html(3)

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

πŸ’– 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