al_color_html(3)

al_color_html3

Allegro 5 api

Usage

#include <allegro5/allegro_color.h>
ALLEGRO_COLOR al_color_html(char const *string)

Overview

Interprets an HTML-style hex number (e.g. #00faff) as a color. The accepted format is the same as al_color_html_to_rgb(3).

Returns the interpreted color, or al_map_rgba(0, 0, 0, 0) if the string could not be parsed.

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

From allegro 5.2.11.3-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.