al_color_rgb_to_hsv(3alleg5)

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

✨ al_color_rgb_to_hsv β€” Allegro 5 API ✨

okay bestie, welcome to the Allegro 5 manual, specifically the lil corner of it that lives at al_color_rgb_to_hsv(3alleg5). it's giving color-conversion realness and honestly? kind of iconic. πŸŽ€


🌈 NAME 🌈

al_color_rgb_to_hsv β€” Allegro 5 API

no cap, that's the whole name. short, sweet, slays. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro_color.h>

void al_color_rgb_to_hsv(float red, float green, float blue,
   float *hue, float *saturation, float *value)

like, look at that signature. three floats in, three float pointers out. main character energy fr fr. ✨


πŸ’– DESCRIPTION πŸ’–

so here's the vibe: you hand it an RGB triplet where the components are all chillin' in the range 0..1. 🫢

then it returns the hue in degrees from 0..360, plus the saturation and value, both in the range 0..1.

that's it. that's the whole function. RGB in, HSV out, no drama, no notes. 🧚

lowkey obsessed with how the ranges are different for hue (degrees, 0..360) versus saturation and value (0..1) β€” don't mix those up, bestie, or your colors will be giving chaos. 😭

πŸ”₯ SEE ALSO πŸ”₯


and that's the tea, bestie. this page came straight out of the Allegro reference manual β€” al_color_rgb_to_hsv(3alleg5) β€” so go forth and convert those colors. periodt. πŸ‘‘πŸ’œπŸŒΈ

πŸ“¦ where this page comes from