al_color_xyz(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸ’– 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 the 0..1 range. You can check for that case with al_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