Function HSVtoRGB (o2scl)¶
-
void o2scl::HSVtoRGB(double h, double s, double v, double &r, double &g, double &b)¶
Convert RGB to HSV color.
Taken from Nathan Schaller’s webpage at http://www.cs.rit.edu/~ncs/color/t_convert.html
The inputs should be in the ranges \( h \in [0,360] \), \( s \in [0,1] \), and \( v \in [0,1] \). The output values
r
,g
, andb
are \( \in [0,1] \).If s == 0, then h = -1 (undefined)