music-field/include/hsv.hpp

20 lines
431 B
C++
Raw Normal View History

2018-12-26 06:31:21 +00:00
#ifndef hsv_h
#define hsv_h
typedef struct {
double r; // a fraction between 0 and 1
double g; // a fraction between 0 and 1
double b; // a fraction between 0 and 1
} rgb;
typedef struct {
double h; // angle in degrees
double s; // a fraction between 0 and 1
double v; // a fraction between 0 and 1
} hsv;
hsv rgb2hsv(rgb in);
rgb hsv2rgb(hsv in);
#endif /* hsv_h */