logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

hsv_to_rgb, rgb_to_hsv - Converts color values between the HSV and RGB color spaces. Allegro game

Description

       Convert color values between the HSV and RGB color spaces. The RGB values range from 0  to  255,  hue  is
       from 0 to 360, and saturation and value are from 0 to 1. Example:

          int r, g, b;
          float hue, saturation, value;
          ...
          /* Convert a reddish color to HSV format. */
          rgb_to_hsv(255, 0, 128, &hue, &saturation, &value);

          /* Now put our tin foil hat, and verify that. */
          hsv_to_rgb(hue, saturation, value, &r, &g, &b);
          ASSERT(r == 255);
          ASSERT(g == 0);
          ASSERT(b == 128);

Name

       hsv_to_rgb,  rgb_to_hsv  -  Converts  color  values  between  the  HSV and RGB color spaces. Allegro game
       programming library.

See Also

exlights(3alleg4), exrgbhsv(3alleg4)

Allegro                                           version 4.4.3                              hsv_to_rgb(3alleg4)

Synopsis

#include<allegro.h>voidhsv_to_rgb(floath,floats,floatv,int*r,int*g,int*b);voidrgb_to_hsv(intr,intg,intb,float*h,float*s,float*v);

See Also