12 using channel_type = float;
14 channel_type r = 0, g = 0, b = 0, a = 1;
44 const channel_type aG,
45 const channel_type aB,
46 const channel_type aA = 1);
71 std::ostream &operator<<(std::ostream &stream,
const color &acolor);
Represents a 4 channel color: {Red, Green, Blue, Alpha}. TODO: channel values should be limited to th...
Definition color.h:11
static const color black
opaque black color
Definition color.h:52
static const color green
opaque green color
Definition color.h:58
void operator+=(const color &aOther)
add two colors together. \warn does not clamp values within the normalized range
static const color white
opaque white color
Definition color.h:54
static const color dark_green
opaque dark green color
Definition color.h:60
static const color deathly_pink
Definition color.h:65
color()=default
constructs a color as opaque black
static const color cornflower_blue
an opaque pastel blue color
Definition color.h:67
color(const channel_type aR, const channel_type aG, const channel_type aB, const channel_type aA=1)
constructs a color with provided channel values. Alpha has a default opaque value
color & operator=(const color &acolor)=default
copy semantics
color(color &&)=default
move semantics
color & operator=(color &&acolor)=default
move semantics
static const color red
opaque red color
Definition color.h:56
bool operator==(const color &aOther) const
equality semantics
color(const color &)=default
copy semantics
static const color blue
opaque blue color
Definition color.h:62
bool operator!=(const color &aOther) const
equality semantics
void clamp()
clamp each channel to the [0 - 1] range