---
name: "al_color_html"
section: "3"
platform: "linux"
package: "allegro"
version: "5.2.11.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/al_color_html"
---

# al\_color\_html(3)

Allegro 5 API

## NAME

al\_color\_html - Allegro 5 API

## SYNOPSIS

-

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

## DESCRIPTION

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)](/al_color_html_to_rgb/3.md).

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.

## SEE ALSO

[al\_color\_html\_to\_rgb(3)](/al_color_html_to_rgb/3.md), [al\_color\_rgb\_to\_html(3)](/al_color_rgb_to_html/3.md)
