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

Function rgb2hsvTuple

src/python/PyImath/PyImathColor3.cpp:455–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453
454template <class T>
455static Color3<T>
456rgb2hsvTuple(const tuple &t)
457{
458 MATH_EXC_ON;
459 Color3<T> color;
460 if(t.attr("__len__")() == 3)
461 {
462 color.x = extract<T>(t[0]);
463 color.y = extract<T>(t[1]);
464 color.z = extract<T>(t[2]);
465
466 return IMATH_NAMESPACE::rgb2hsv(color);
467 }
468 else
469 throw std::invalid_argument ("Color3 expects tuple of length 3");
470}
471
472template <class T>
473static void

Callers

nothing calls this directly

Calls 1

rgb2hsvFunction · 0.70

Tested by

no test coverage detected