| 427 | |
| 428 | template <class T> |
| 429 | static Color3<T> |
| 430 | hsv2rgbTuple(const tuple &t) |
| 431 | { |
| 432 | MATH_EXC_ON; |
| 433 | Color3<T> color; |
| 434 | if(t.attr("__len__")() == 3) |
| 435 | { |
| 436 | color.x = extract<T>(t[0]); |
| 437 | color.y = extract<T>(t[1]); |
| 438 | color.z = extract<T>(t[2]); |
| 439 | |
| 440 | return IMATH_NAMESPACE::hsv2rgb(color); |
| 441 | } |
| 442 | else |
| 443 | throw std::invalid_argument ("Color3 expects tuple of length 3"); |
| 444 | } |
| 445 | |
| 446 | template <class T> |
| 447 | static Color3<T> |