1al_color_name_to_rgb(3)                                al_color_name_to_rgb(3)
2
3
4

NAME

6       al_color_name_to_rgb - Allegro 5 API
7

SYNOPSIS

9              #include <allegro5/allegro_color.h>
10
11              bool al_color_name_to_rgb(char const *name, float *r, float *g, float *b)
12

DESCRIPTION

14       Parameters:
15
16       · name - The (lowercase) name of the color.
17
18       · r,  g,  b - If one of the recognized color names below is passed, the
19         corresponding RGB values in the range 0..1 are written.
20
21       The 148 recognized names are:
22
23              aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque,
24              black,   blanchedalmond,  blue,  blueviolet,  brown,  burlywood,
25              cadetblue, chartreuse, chocolate, coral,  cornflowerblue,  corn‐
26              silk,  crimson,  cyan,  darkblue, darkcyan, darkgoldenrod, dark‐
27              gray, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkor‐
28              ange,  darkorchid, darkred, darksalmon, darkseagreen, darkslate‐
29              blue, darkslategray, darkturquoise, darkviolet, deeppink,  deep‐
30              skyblue,  dimgray,  dodgerblue,  firebrick, floralwhite, forest‐
31              green, fuchsia, gainsboro, ghostwhite,  goldenrod,  gold,  gray,
32              green, greenyellow, honeydew, hotpink, indianred, indigo, ivory,
33              khaki, lavenderblush, lavender, lawngreen, lemonchiffon,  light‐
34              blue,  lightcoral,  lightcyan, lightgoldenrodyellow, lightgreen,
35              lightgrey, lightpink, lightsalmon, lightseagreen,  lightskyblue,
36              lightslategray,  lightsteelblue,  lightyellow,  lime, limegreen,
37              linen, magenta,  maroon,  mediumaquamarine,  mediumblue,  mediu‐
38              morchid,  mediumpurple, mediumseagreen, mediumslateblue, medium‐
39              springgreen,  mediumturquoise,  mediumvioletred,   midnightblue,
40              mintcream,   mistyrose,  moccasin,  avajowhite,  navy,  oldlace,
41              olive,  olivedrab,  orange,  orangered,  orchid,  palegoldenrod,
42              palegreen,  paleturquoise, palevioletred, papayawhip, peachpuff,
43              peru, pink, plum, powderblue, purple, rebeccapurple, red,  rosy‐
44              brown,  royalblue,  saddlebrown,  salmon,  sandybrown, seagreen,
45              seashell, sienna, silver, skyblue, slateblue,  slategray,  snow,
46              springgreen,  steelblue,  tan, teal, thistle, tomato, turquoise,
47              violet, wheat, white, whitesmoke, yellow, yellowgreen
48
49       They are taken from CSS: <https://www.w3.org/TR/css-color-4/>
50
51       Note that these 9 colors have two names and so there are only 139  dis‐
52       tinct  colors:  aqua = cyan, darkgray = darkgrey, darkslategray = dark‐
53       slategrey, dimgray = dimgrey, fuchsia = purple, gray = grey,  lightgray
54       = lightgrey, lightslategray = lightslategrey, slategray = slategrey
55
56       Returns: true if a name from the list above was passed, else false.
57

SEE ALSO

59       al_color_name(3)
60
61
62
63Allegro reference manual                               al_color_name_to_rgb(3)
Impressum