18 float b ) : r_(r), g_(g), b_(b) { }
29 float R( )
const {
return r_; }
34 float G( )
const {
return g_; }
39 float B( )
const {
return b_; }
45 {
return ( lhs.
r_ == rhs.
r_ && lhs.
g_ == rhs.
g_ && lhs.
b_ == rhs.
b_); }
51 {
return !( lhs == rhs ); }
97 double r = base.
R() * val + back.R() * (1.-val);
98 double g = base.
G() * val + back.G() * (1.-val);
99 double b = base.
B() * val + back.B() * (1.-val);
100 return color(r, g, b);
111 double r = pos.
R() * val + back.R() * (1.-val);
112 double g = pos.
G() * val + back.G() * (1.-val);
113 double b = pos.
B() * val + back.B() * (1.-val);
114 return color(r, g, b);
119 double r = neg.
R() * val + back.R() * (1.-val);
120 double g = neg.
G() * val + back.G() * (1.-val);
121 double b = neg.
B() * val + back.B() * (1.-val);
122 return color(r, g, b);
const color limegreen(0.2, 0.8, 0.2)
const color green(0, 1, 0)
const color blue(0, 0, 1)
float B() const
Definition: Color.h:39
const color lightgray(0.6, 0.6, 0.6)
float g_
Definition: Color.h:57
const color magenta(1, 0, 1)
float b_
Definition: Color.h:57
const color pink(1, 0.5, 0.5)
float R() const
Definition: Color.h:29
const color darkergray(0.3, 0.3, 0.3)
const color yellow(1, 1, 0)
float G() const
Definition: Color.h:34
const color orangered(1, 0.27, 0)
const color black(0, 0, 0)
color Gradient(double val, const color &base, const color &back=color(0.99, 0.99, 0.99))
Definition: Color.h:93
color MakeUpColor(int num)
Definition: Color.cc:733
const color azure(0, 0.5, 1)
const color wheat(0.96, 0.87, 0.7)
friend bool operator==(const color &lhs, const color &rhs)
Definition: Color.h:44
friend bool operator!=(const color &lhs, const color &rhs)
Definition: Color.h:50
const color gray(0.5, 0.5, 0.5)
const color darkgray(0.3, 0.3, 0.3)
const color seashell(1, 0.96, 0.93)
color()
Definition: Color.h:20
const color lightergray(0.8, 0.8, 0.8)
color(float r, float g, float b)
Definition: Color.h:16
ostream & operator<<(ostream &o, const color &c)
Definition: Color.cc:13
const color lighterpink(1, 0.8, 0.8)
const color cyan(0, 1, 1)
float r_
Definition: Color.h:57
color GradientMult(double val, const color &neg, const color &pos, const color &back=color(0.99, 0.99, 0.99))
Definition: Color.h:106
const color white(1, 1, 1)