Imath
<navlinks>
<page>

# Color Functions

Functions that operate on colors.

    #include <Imath/ImathColorAlgo.h>

template<class T>
constexpr Vec3<T> Imath::hsv2rgb(const Vec3<T> &hsv) noexcept

  Convert 3-channel hsv to rgb.

template<class T>
constexpr Color4<T> Imath::hsv2rgb(const Color4<T> &hsv) noexcept

  Convert 4-channel hsv to rgb (with alpha).

template<class T>
constexpr Color4<T> Imath::rgb2hsv(const Color4<T> &rgb) noexcept

  Convert 4-channel rgb to hsv (with alpha).

template<class T>
constexpr Vec3<T> Imath::rgb2hsv(const Vec3<T> &rgb) noexcept

  Convert 3-channel rgb to hsv.

template<class T>
constexpr PackedColor Imath::rgb2packed(const Color4<T> &c) noexcept

  Convert 4-channel rgb to PackedColor (with alpha)

template<class T>
constexpr PackedColor Imath::rgb2packed(const Vec3<T> &c) noexcept

  Convert 3-channel rgb to PackedColor.

template<class T>
void Imath::packed2rgb(PackedColor packed, Color4<T> &out) noexcept

  Convert PackedColor to 4-channel rgb (with alpha).

  Return the result in the `out` parameter.

template<class T>
void Imath::packed2rgb(PackedColor packed, Vec3<T> &out) noexcept

  Convert PackedColor to 3-channel rgb.

  Return the result in the `out` parameter.

</page>