al_color_hsv(3alleg5)

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

✨ al_color_hsv β€” Allegro 5 API ✨

okay bestie, welcome to al_color_hsv(3alleg5), straight out of the Allegro 5 API manual πŸ’– this one is short and sweet and it's literally just "give me a colour, but make it HSV." no cap.


🌈 SYNOPSIS 🌈

#include <allegro5/allegro_color.h>

ALLEGRO_COLOR al_color_hsv(float h, float s, float v)

πŸŽ€ DESCRIPTION πŸŽ€

So like, this function hands you back an ALLEGRO_COLOR(3alleg5) struct, and it builds it from HSV values β€” that's hue, saturation, and value. Iconic trio, honestly. The way that hue/sat/value just work together? Obsessed. πŸ¦‹

Here's the rundown on the params, bestie:

  • hue β€” the colour's hue angle, and it lives in the range 0..360. think of it like spinning around a colour wheel, one full rotation and you're back where you started 🎑
  • saturation β€” how saturated the colour is, in the range 0..1. lowkey washed out at 0, fully poppin' at 1 πŸ’…
  • value β€” the colour's value, in the range 0..1. this is the brightness dial, and yes it goes all the way down to 0 🌸
fr fr, mind those ranges. hue is degrees (0..360) but saturation and value are the lil 0..1 float babies β€” do not mix them up, i'm begging 😭

πŸ‘€ SEE ALSO πŸ‘€


and that's the whole page, bestie, we ate and left no crumbs 🫢 Allegro reference manual, al_color_hsv(3alleg5) β€” mwah, catch u in the next manpage πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from