al_color_lch(3)
π NAME π
hey bestie!! welcome to al_color_lch(3) from the Library Functions Manual β this is the Allegro 5 API page for al_color_lch, and sheβs here to turn your CIE LCH values into a color. slay. π
β¨
π SYNOPSIS π
#include <allegro5/allegro_color.h>
ALLEGRO_COLOR al_color_lch(float l, float c, float h)
π DESCRIPTION π
okay so this function returns an ALLEGRO_COLOR(3) structure from CIE LCH values. itβs giving βcolor conversion but make it visually uniform.β π
LCH colors are very similar to HSL: L and H mean the same thing, and C corresponds to S. but!! LCH is more visually uniform β highkey iconic behavior. β¨
also, important bestie: this function expects the angle for H in radians, not in degrees. no cap, do not come in here with degrees. π
the CIE LCH color space is a cylindrical representation of the L*a*b* color space. the L component is the same, and C and H are computed like this:
C = sqrt(a * a + b * b)
H = atan2(b, a)
π¦ SINCE π¦
5.2.3 β periodt, sheβs been around. π
πΈ SEE ALSO πΈ
π signed, sealed, delivered by the Allegro reference manual, page al_color_lch(3) β thatβs the footer flex, and thereβs no extra date stamped on this one. π«Άπ
π¦ 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