This file is part of the Lumina Graphics Framework [L/util].
This file will define LColor and various color functions. In most cases you should include Color.hpp instead, which provides additional helper functions (but has more dependencies).
Go to the source code of this file.
Classes | |
struct | ColorTraits< T, Enable > |
struct | ColorImpl< T, Alpha > |
struct | ColorImpl< T, true > |
struct | ColorImpl< T, false > |
struct | Color< T, A > |
Functions | |
template<class T , class U > | |
T | clamp (U v) |
template<typename Tout > | |
std::enable_if < std::is_integral< typename Tout::type >::value, Tout > ::type | makeColor (float r, float g, float b, float a=1.f) |
Creates a color from propertions values. More... | |
template<typename Tout > | |
std::enable_if < std::is_floating_point < typename Tout::type >::value, Tout >::type | makeColor (float r, float g, float b, float a=1.f) |
template<typename T > | |
float | colorProportion (T v) |
Returns the proportion of the given value to the max value of that color type. | |
template<typename Tout , typename Tin > | |
Tout | convertChannelType (Tin in) |
template<typename Tdst , typename Tsrc > | |
std::enable_if< Tdst::A, Tdst > ::type | color_cast (Color< Tsrc, true > in) |
Converts one color type to another one using float proportions (expect minimal loss in precision) More... | |
template<typename Tdst , typename Tsrc > | |
std::enable_if<!Tdst::A, Tdst > ::type | color_cast (Color< Tsrc, true > in) |
template<typename Tdst , typename Tsrc > | |
Tdst | color_cast (Color< Tsrc, false > in) |
template<typename T > | |
Color< T, true > | blendAdditive (Color< T, true > lh, Color< T, true > rh) |
Blends two colors additive. More... | |
template<typename T > | |
Color< T, true > | blendAlpha (Color< T, true > lh, Color< T, true > rh) |
Blends two colors via alpha blend. More... | |