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

Function hsv2rgbTuple

src/python/PyImath/PyImathColor4.cpp:177–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175
176template <class T>
177static Color4<T>
178hsv2rgbTuple(const tuple &t)
179{
180 MATH_EXC_ON;
181 Color4<T> color;
182 if(t.attr("__len__")() == 4)
183 {
184 color.r = extract<T>(t[0]);
185 color.g = extract<T>(t[1]);
186 color.b = extract<T>(t[2]);
187 color.a = extract<T>(t[3]);
188
189 return IMATH_NAMESPACE::hsv2rgb(color);
190 }
191 else
192 throw std::invalid_argument ("Color4 expects tuple of length 4");
193}
194
195template <class T>
196static Color4<T>

Callers

nothing calls this directly

Calls 1

hsv2rgbFunction · 0.70

Tested by

no test coverage detected