al_color_lab(3)
๐ NAME ๐
okay bestie, this is al_color_lab(3) from the Library Functions Manual โ it's part of the Allegro 5 API, and it's literally the function for turning CIE L*a*b* values into an ALLEGRO_COLOR(3). slay.
โจ SYNOPSIS โจ
#include <allegro5/allegro_color.h>
ALLEGRO_COLOR al_color_lab(float l, float a, float b)
๐ธ DESCRIPTION ๐ธ
So here's the tea: al_color_lab returns an ALLEGRO_COLOR(3) structure from CIE L*a*b* values. The L* component corresponds to luminance from 0..1, babe. The a* and b* components are in the range -1..+1. periodt.
Note: The L*a*b* color space can represent more colors than are visible in sRGB, so conversion may result in RGB values outside of the0..1range. You can check for that case withal_is_color_valid(3). not me warning you ahead of time ๐
Note: In some literature the range ofL*is0to100anda*andb*are from-100to+100. In that case divide all components by100before passing them to this function. math girlies, this one's for you ๐งฎโจ
โญ SINCE โญ
5.2.3 โ yes, it's been iconic since 5.2.3, no cap.
๐ฆ SEE ALSO ๐ฆ
๐ and that's the whole page, bestie โ from the Allegro reference manual, page al_color_lab(3), and the footer had no date so I'm not inventing one ๐ cute sign-off complete ๐ซถ
๐ฆ 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