MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/Imath / hsv2rgbTuple

Function hsv2rgbTuple

src/python/PyImath/PyImathColor3.cpp:429–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427
428template <class T>
429static Color3<T>
430hsv2rgbTuple(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
446template <class T>
447static Color3<T>

Callers

nothing calls this directly

Calls 1

hsv2rgbFunction · 0.70

Tested by

no test coverage detected