al_color_name_to_rgb(3alleg5)
π al_color_name_to_rgb β Allegro 5 API π
okay bestie, welcome to al_color_name_to_rgb(3alleg5), straight out of the Allegro 5 API. this one's a lil cutie: you hand it a color name, it hands you back actual numbers. let's get into it π
β¨ SYNOPSIS β¨
#include <allegro5/allegro_color.h>
bool al_color_name_to_rgb(char const *name, float *r, float *g, float *b)
πΈ DESCRIPTION πΈ
here's the tea on the parameters, bestie:
nameβ the (lowercase) name of the color. lowercase only, she's picky πr,g,bβ if you pass one of the recognized color names listed below, the corresponding RGB values in the range0..1get written in here. yes,0..1, not0..255, we're fancy like that β¨
the 148 recognized names are:
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque,
black, blanchedalmond, blue, blueviolet, brown, burlywood,
cadetblue, chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod,
darkgray, darkgreen, darkkhaki, darkmagenta, darkolivegreen,
darkorange, darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkturquoise, darkviolet,
deeppink, deepskyblue, dimgray, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite,
goldenrod, gold, gray, green, greenyellow, honeydew, hotpink,
indianred, indigo, ivory, khaki, lavenderblush, lavender,
lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgreen, lightgrey, lightpink,
lightsalmon, lightseagreen, lightskyblue, lightslategray,
lightsteelblue, lightyellow, lime, limegreen, linen, magenta,
maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue, mintcream,
mistyrose, moccasin, avajowhite, navy, oldlace, olive, olivedrab,
orange, orangered, orchid, palegoldenrod, palegreen,
paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, rebeccapurple, red, rosybrown,
royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell,
sienna, silver, skyblue, slateblue, slategray, snow, springgreen,
steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat,
white, whitesmoke, yellow, yellowgreen
they are taken from CSS: https://www.w3.org/TR/css-color-4/ β no cap, that's the source π«Ά
heads up babes: these 9 colors have two names each, so there are only 139 distinct colors:aqua = cyan,darkgray = darkgrey,darkslategray = darkslategrey,dimgray = dimgrey,fuchsia = purple,gray = grey,lightgray = lightgrey,lightslategray = lightslategrey,slategray = slategrey
Returns: true if a name from the list above was passed, else false. so like, vibe check: did your name make the list? yes β true, no β false π
π SEE ALSO π
and that's the whole page, bestie π this came to you from the Allegro reference manual, page al_color_name_to_rgb(3alleg5), manual section 3alleg5 β go forth and name your colors, you ate π¦β¨
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms