al_color_rgb_to_hsl(3)
π NAME π
al_color_rgb_to_hsl β okay bestie, this is the Allegro 5 API, straight from the Library Functions Manual, and itβs literally the RGB-to-HSL color converter. Like, it takes your RGB vibes and translates them into hue/saturation/lightness. So iconic. β¨
β¨ 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 π: you give al_color_rgb_to_hsl an RGB triplet where the components are in the range 0..1, and it hands you back the hue in degrees from 0..360, plus saturation and lightness, both in the range 0..1.
Thatβs it. Thatβs the whole glow-up. No cap β RGB goes in, HSL comes out, and the ranges are exactly the ones listed above. π
π¦ SEE ALSO π¦
β signing off from the Allegro reference manual, for al_color_rgb_to_hsl(3) β stay colorful, bestie π«Άπβ¨
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms