| 1 | /* xscreensaver, Copyright (c) 1992, 1997 Jamie Zawinski <jwz@jwz.org> |
| 2 | * |
| 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. |
| 10 | */ |
| 11 | |
| 12 | #ifndef __HSV_H__ |
| 13 | #define __HSV_H__ |
| 14 | |
| 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. |
| 19 | */ |
| 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); |
| 26 | |
| 27 | #endif /* __HSV_H__ */ |