DDraceNetwork Docs
color.h File Reference
#include <base/math.h>
#include <base/vmath.h>
#include <optional>
Include dependency graph for color.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  color4_base< DerivedT >
 
class  ColorHSLA
 
class  ColorHSVA
 
class  ColorRGBA
 

Functions

constexpr float RgbToHue (float r, float g, float b)
 
template<typename T , typename F >
constexpr T color_cast (const F &)=delete
 
template<>
constexpr ColorHSLA color_cast (const ColorRGBA &rgb)
 
template<>
constexpr ColorRGBA color_cast (const ColorHSLA &hsl)
 
template<>
constexpr ColorHSLA color_cast (const ColorHSVA &hsv)
 
template<>
constexpr ColorHSVA color_cast (const ColorHSLA &hsl)
 
template<>
constexpr ColorRGBA color_cast (const ColorHSVA &hsv)
 
template<>
constexpr ColorHSVA color_cast (const ColorRGBA &rgb)
 
template<typename T >
constexpr T color_scale (const T &col, float s)
 
template<typename T >
constexpr T color_invert (const T &col)
 
template<typename T >
std::optional< T > color_parse (const char *pStr)
 

Function Documentation

◆ color_cast() [1/7]

template<>
constexpr ColorRGBA color_cast ( const ColorHSLA hsl)
inlineconstexpr

◆ color_cast() [2/7]

template<>
constexpr ColorHSVA color_cast ( const ColorHSLA hsl)
inlineconstexpr

◆ color_cast() [3/7]

template<>
constexpr ColorHSLA color_cast ( const ColorHSVA hsv)
inlineconstexpr

◆ color_cast() [4/7]

template<>
constexpr ColorRGBA color_cast ( const ColorHSVA hsv)
inlineconstexpr

◆ color_cast() [5/7]

template<>
constexpr ColorHSLA color_cast ( const ColorRGBA rgb)
inlineconstexpr

◆ color_cast() [6/7]

template<>
constexpr ColorHSVA color_cast ( const ColorRGBA rgb)
inlineconstexpr

◆ color_cast() [7/7]

template<typename T , typename F >
constexpr T color_cast ( const F &  )
constexprdelete

◆ color_invert()

template<typename T >
constexpr T color_invert ( const T &  col)
constexpr

◆ color_parse()

template<typename T >
std::optional< T > color_parse ( const char *  pStr)

◆ color_scale()

template<typename T >
constexpr T color_scale ( const T &  col,
float  s 
)
constexpr

◆ RgbToHue()

constexpr float RgbToHue ( float  r,
float  g,
float  b 
)
inlineconstexpr