al_color_oklab(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– al_color_oklab β€” Allegro 5 API πŸ’–

okay bestie, so this one lives in the 3alleg5 manual and it's literally the glow-up function for turning Oklab numbers into an actual color. no cap, it's giving color-science main character energy ✨


🌸 SYNOPSIS 🌸

#include <allegro5/allegro_color.h>

ALLEGRO_COLOR al_color_oklab(float l, float a, float b)

πŸŽ€ DESCRIPTION πŸŽ€

So like, this hands you back an ALLEGRO_COLOR(3alleg5) struct built from Oklab values. Here's the breakdown, iykyk:

  • the l component is the luminance vibe, and it lives in the range 0..1
  • the a and b components hang out in the range -1..+1
⚠️ Note, and this part matters: the Oklab color space can represent more colors than are visible in sRGB, so the conversion may result in RGB values outside of the 0..1 range 😭. You can check for that case with al_is_color_valid(3alleg5) β€” do that, bestie, don't just yolo it πŸ’…

⭐ SINCE ⭐

5.2.8 β€” vintage, but make it iconic πŸ¦‹


🌈 SEE ALSO 🌈


k bye, ily, go make something pretty 🫢

this was brought to you by the <strong>Allegro reference manual</strong>, page al_color_oklab(3alleg5) β€” same name up top and down here, symmetrical queen πŸ‘‘

πŸ“¦ where this page comes from