All Classes Files Functions Variables Typedefs Pages
Classes | Typedefs | Functions
ColorCore.hpp File Reference

Detailed Description

This file is part of the Lumina Graphics Framework [L/util].

Author
Lukas Kalbertodt lukas.nosp@m..kal.nosp@m.berto.nosp@m.dt@g.nosp@m.mail..nosp@m.com

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 >
 

Typedefs

using Color8 = Color< uint8_t >
 
using Color8A = Color< uint8_t, true >
 
using Color16 = Color< uint16_t >
 
using Color16A = Color< uint16_t, true >
 
using Color32 = Color< uint32_t >
 
using Color32A = Color< uint32_t, true >
 
using Color32f = Color< float >
 
using Color32fA = Color< float, true >
 
using Color16f = Color< half >
 
using Color16fA = Color< half, true >
 

Functions

template<class T , class U >
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...