al_color_lch(3)

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

πŸ’– 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