al_color_xyz(3)
π NAME π
al_color_xyz β Allegro 5 API, bestie β¨
β¨ SYNOPSIS β¨
#include <allegro5/allegro_color.h>
ALLEGRO_COLOR al_color_xyz(float x, float y, float z)
π DESCRIPTION π
Okay so this function hands you back an ALLEGRO_COLOR structure β yes, that's the ALLEGRO_COLOR(3) situation β built from XYZ values. The CIE 1931 XYZ color space has three components in the range 0..1, and that is literally the whole vibe check here.
The Y component corresponds to luminance, while the X and Z components define the color. RGB components are always assumed to be in sRGB space, no cap.
Note: The XYZ color space can represent more colors than are visible in sRGB, and therefore conversion may result in RGB values outside of the0..1range. You can check for that case withal_is_color_valid(3)π«Ά
πΈ SINCE πΈ
This one has been iconic since 5.2.3 β¨
π¦ SEE ALSO π¦
Source: <strong>Allegro reference manual</strong> Β· page: al_color_xyz(3) Β· version: since 5.2.3 Β· date: not printed on this page, 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