al_color_xyy(3alleg5)
π al_color_xyy β Allegro 5 API π
okay bestie, so this page is al_color_xyy(3alleg5) from the Allegro reference manual, and it's genuinely so cute. sit down, grab a boba, let's talk color spaces π
β¨ NAME β¨
al_color_xyy β the Allegro 5 API function that hands you a color straight out of the xyY color space. iykyk π
πΈ SYNOPSIS πΈ
#include <allegro5/allegro_color.h>
ALLEGRO_COLOR al_color_xyy(float x, float y, float y2)
like, three floats go in, one ALLEGRO_COLOR comes out. no cap. β¨
π¦ DESCRIPTION π¦
so basically this function returns an ALLEGRO_COLOR(3alleg5) structure built from xyY values. that's it, that's the whole vibe π«Ά
the tea on the Y component though: in the xyY color space, Y is literally the exact same Y you'd find in XYZ. same girl, different font. π
but the x and y values? those are computed from XYZ like this, and you're gonna want to screenshot this fr fr:
x = X / (X + Y + Z)
y = Y / (X + Y + Z)
so x and y are just the XYZ components normalized by their sum, periodt. that's the whole math. iconic behavior honestly π
lowkey important: the third parameter in the signature is namedy2, notyβ that's not a typo, that's just how it's written, so don't come for it π
β SINCE β
available since version 5.2.3 β a classic, a legend, a main character π
π SEE ALSO π
al_color_xyy_to_rgb(3alleg5)β the reverse glow-up, xyY β‘οΈ rgb π«al_color_rgb_to_xyy(3alleg5)β and the other direction, rgb β‘οΈ xyY π
that's the whole page, bestie, you ate it up π this was brought to you by the Allegro reference manual, home of al_color_xyy(3alleg5) β no dates on this one, just vibes β¨ππ¦
π¦ 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