Back to index

kdeartwork  4.3.2
xs_hsv.h
Go to the documentation of this file.
00001 /* xscreensaver, Copyright (c) 1992, 1997 Jamie Zawinski <jwz@jwz.org>
00002  *
00003  * Permission to use, copy, modify, distribute, and sell this software and its
00004  * documentation for any purpose is hereby granted without fee, provided that
00005  * the above copyright notice appear in all copies and that both that
00006  * copyright notice and this permission notice appear in supporting
00007  * documentation.  No representations are made about the suitability of this
00008  * software for any purpose.  It is provided "as is" without express or 
00009  * implied warranty.
00010  */
00011 
00012 #ifndef __HSV_H__
00013 #define __HSV_H__
00014 
00015 /* Converts between RGB and HSV color spaces.
00016    R, G, and B are in the range 0 - 65535;
00017    H is in the range 0 - 360;
00018    S and V are in the range 0.0 - 1.0.
00019  */
00020 extern void hsv_to_rgb (int h, double s, double v,
00021                      unsigned short *r,
00022                      unsigned short *g,
00023                      unsigned short *b);
00024 extern void rgb_to_hsv (unsigned short r, unsigned short g, unsigned short b,
00025                      int *h, double *s, double *v);
00026 
00027 #endif /* __HSV_H__ */