1al_color_html_to_rgb(3) al_color_html_to_rgb(3)
2
3
4
6 al_color_html_to_rgb - Allegro 5 API
7
9 #include <allegro5/allegro_color.h>
10
11 bool al_color_html_to_rgb(char const *string,
12 float *red, float *green, float *blue)
13
15 Interprets an HTML-style hex number (e.g. #00faff) as a color. The
16 only accepted formats are "#RRGGBB" and "RRGGBB" where R, G, B are
17 hexadecimal digits [0-9A-Fa-f].
18
19 Returns true on success, false on failure. On failure all components
20 are set to zero.
21
22 Note: the behaviour on invalid strings is different from Allegro
23 5.0.x.
24
26 al_color_html(3), al_color_rgb_to_html(3)
27
28
29
30Allegro reference manual al_color_html_to_rgb(3)