31 std::array<double, 3> Hsv2Rgb(
double h,
double s,
double v)
33 array<double, 3> ret_val {{v, v, v}};
35 const int i = floor(h);
36 const double f = h - i;
37 const double p = v * (1.0 - s);
38 const double q = v * (1.0 - s * f);
39 const double t = v * (1.0 - s * (1.0 - f));
42 case 0: ret_val = {{v, t, p}};
break;
43 case 1: ret_val = {{q, v, p}};
break;
44 case 2: ret_val = {{p, v, t}};
break;
45 case 3: ret_val = {{p, q, v}};
break;
46 case 4: ret_val = {{t, p, v}};
break;
47 default: ret_val = {{v, p, q}};
break;
Namespace for the core simulator.
Rgb color def to Hsv color def: r,g,b values are from 0 to 1 and h = [0,360], s = [0...