al_color_html_to_rgb(3alleg5)

al_color_html_to_rgb3alleg5

Allegro 5 api

Usage

#include <allegro5/allegro_color.h>
bool al_color_html_to_rgb(char const *string,
   float *red, float *green, float *blue)

Overview

Interprets an HTML-style hex number (e.g. #00faff) as a color. The only accepted formats are “#RRGGBB” and “RRGGBB” where R, G, B are hexadecimal digits [0-9A-Fa-f].

Returns true on success, false on failure. On failure all components are set to zero.

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

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

From allegro5-doc 2:5.2.10.1+dfsg-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.