GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  RGB_TO_HSV (3)

NAME

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

CONTENTS

Synopsis
Description
See Also

SYNOPSIS

#include <allegro.h>

void hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b);

void rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v);

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);

SEE ALSO

exlights(3), exrgbhsv(3)
Search for    or go to Top of page |  Section 3 |  Main Index


Allegro HSV_TO_RGB (3) version 4.4.2

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.