al_color_rgb_to_hsl(3alleg5)
β¨ al_color_rgb_to_hsl β Allegro 5 API β¨
okay bestie, pull up a chair πͺ because we're about to talk about the glow-up of color formats. this is al_color_rgb_to_hsl(3alleg5) from the Allegro 5 API, and she's here to convert your RGB vibes into HSL realness. no cap. π
π SYNOPSIS
#include <allegro5/allegro_color.h>
void al_color_rgb_to_hsl(float red, float green, float blue,
float *hue, float *saturation, float *lightness)
π DESCRIPTION
so here's the tea, bestie π β you hand over an RGB triplet, and every component lives in the range 0..1, okay? that's the rule, we don't break it.
then this function does its lil magic and gives you back:
- the hue in degrees, chillin' somewhere between 0..360 π
- the saturation in the range 0..1
- the lightness in the range 0..1
and that's it. that's the whole serve. she ate and left no crumbs. π
ngl, this one is a pointer party βhue,saturationandlightnessare allfloat *, so you're passing in addresses to write the results into. bring your&s, bestie. π
π SEE ALSO
al_color_hsl_to_rgb(3alleg5)β the reverse glow-up, HSL back to RGB π¦al_color_hsl(3alleg5)β the HSL constructor-ish bestie π
and that's the whole page, periodt. β¨ this lil love letter lives in the Allegro reference manual, and yes, al_color_rgb_to_hsl(3alleg5) is exactly who she is. go convert some colors, main character. πΈπ«Ά
π¦ 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