Uic4 port
[kdeartwork.git] / kscreensaver / xsavers / xs_hsv.h
blobe0fdfb0fe60a8b9a204da7712069bbc52ffed6b0
1 /* xscreensaver, Copyright (c) 1992, 1997 Jamie Zawinski <jwz@jwz.org>
3 * Permission to use, copy, modify, distribute, and sell this software and its
4 * documentation for any purpose is hereby granted without fee, provided that
5 * the above copyright notice appear in all copies and that both that
6 * copyright notice and this permission notice appear in supporting
7 * documentation. No representations are made about the suitability of this
8 * software for any purpose. It is provided "as is" without express or
9 * implied warranty.
12 #ifndef __HSV_H__
13 #define __HSV_H__
15 /* Converts between RGB and HSV color spaces.
16 R, G, and B are in the range 0 - 65535;
17 H is in the range 0 - 360;
18 S and V are in the range 0.0 - 1.0.
20 extern void hsv_to_rgb (int h, double s, double v,
21 unsigned short *r,
22 unsigned short *g,
23 unsigned short *b);
24 extern void rgb_to_hsv (unsigned short r, unsigned short g, unsigned short b,
25 int *h, double *s, double *v);
27 #endif /* __HSV_H__ */