MCL
Minimalistic Color Library
 All Classes Files
RGBBase< T > Class Template Reference

[RGB] r: [0..1]; g: [0..1]; b: [0..1]; a: [0..1]
[RGBf] r: [0..1]; g: [0..1]; b: [0..1]; a: [0..1]
[RGBub] r: [0..255]; g: [0..255]; b: [0..255]; a: [0..255]

#include <nauths/mcl/spaces/rgb.hh>

+ Inheritance diagram for RGBBase< T >:

Public Types

enum  Key {
  R = 0, G = 1, B = 2, A = 3,
  ALPHA = 3
}
 
typedef T Value
 
typedef RGBBase< T > Self
 
typedef std::array< T, 4 > Super
 
typedef RGBTraits< Self >
::Reference 
Reference
 

Public Member Functions

 RGBBase (Value r, Value g, Value b)
 
 RGBBase (Value r, Value g, Value b, Value a)
 
Value r () const
 
Value g () const
 
Value b () const
 
Value a () const
 
Value & r ()
 
Value & g ()
 
Value & b ()
 
Value & a ()
 
Value alpha () const
 
Value & alpha ()
 
void r (Value x)
 
void g (Value x)
 
void b (Value x)
 
void a (Value x)
 
void alpha (Value x)
 
void clamp ()
 
RGBBase clamped () const
 
void round (double to=0.001)
 
RGBBase rounded (double to=0.001) const
 

Static Public Member Functions

static Value min ()
 
static Value max ()
 
static SpaceType type ()
 

Public Attributes

T elements
 STL member.
 

The documentation for this class was generated from the following files: