20 static const int BLACK;
21 static const int GRAY_25;
22 static const int GRAY;
23 static const int GRAY_75;
24 static const int WHITE;
26 static const int GREEN;
27 static const int BLUE;
28 static const int DARK_RED;
29 static const int DARK_GREEN;
30 static const int DARK_BLUE;
31 static const int CYAN;
32 static const int MAGENTA;
33 static const int YELLOW;
34 static const int DARK_CYAN;
35 static const int DARK_MAGENTA;
36 static const int DARK_YELLOW;
37 static const int ORANGE;
38 static const int CHARTREUSE;
39 static const int SPRING_GREEN;
40 static const int DODGER_BLUE;
41 static const int VIOLET;
42 static const int PINK;
46 static const ref Color Black =
new Color(0.0, 0.0, 0.0, 1.0);
47 static const ref Color Gray25 =
new Color(0.25, 0.25, 0.25, 1.0);
48 static const ref Color Gray =
new Color(0.5, 0.5, 0.5, 1.0);
49 static const ref Color Gray75 =
new Color(0.75, 0.75, 0.75, 1.0);
50 static const ref Color White =
new Color(1.0, 1.0, 1.0, 1.0);
51 static const ref Color Red =
new Color(1.0, 0.0, 0.0, 1.0);
52 static const ref Color Green =
new Color(0.0, 1.0, 0.0, 1.0);
53 static const ref Color Blue =
new Color(0.0, 0.0, 1.0, 1.0);
54 static const ref Color DarkRed =
new Color(0.5, 0.0, 0.0, 1.0);
55 static const ref Color DarkGreen =
new Color(0.0, 0.5, 0.0, 1.0);
56 static const ref Color DarkBlue =
new Color(0.0, 0.0, 0.5, 1.0);
57 static const ref Color Cyan =
new Color(0.0, 1.0, 1.0, 1.0);
58 static const ref Color Magenta =
new Color(1.0, 0.0, 1.0, 1.0);
59 static const ref Color Yellow =
new Color(1.0, 1.0, 0.0, 1.0);
60 static const ref Color DarkCyan =
new Color(0.0, 0.5, 0.5, 1.0);
61 static const ref Color DarkMagenta =
new Color(0.5, 0.0, 0.5, 1.0);
62 static const ref Color DarkYellow =
new Color(0.5, 0.5, 0.0, 1.0);
63 static const ref Color Orange =
new Color(1.0, 0.5, 0.0, 1.0);
64 static const ref Color Chartreuse =
new Color(0.5, 1.0, 0.0, 1.0);
65 static const ref Color SpringGreen =
new Color(0.0, 1.0, 0.5, 1.0);
66 static const ref Color DodgerBlue =
new Color(0.0, 0.5, 1.0, 1.0);
67 static const ref Color Violet =
new Color(0.5, 0.0, 1.0, 1.0);
68 static const ref Color Pink =
new Color(1.0, 0.0, 0.5, 1.0);
70 void Color(
float red = 0.0,
float green = 0.0,
float blue = 0.0,
float alpha = 0.0);
73 static proto ref Color FromInt(
int color);
75 static proto ref Color FromVector(
vector color);
77 static proto ref Color FromRGBA(
int r,
int g,
int b,
int a);
79 static proto ref Color FromIntSRGB(
int color);
81 static proto ref Color FromSRGBA(
int r,
int g,
int b,
int a);
83 proto ref Color
Copy();
85 proto external
float R();
87 proto external
float G();
89 proto external
float B();
91 proto external
float A();
93 proto external
void SetR(
float red);
95 proto external
void SetG(
float green);
97 proto external
void SetB(
float blue);
99 proto external
void SetA(
float alpha);
101 proto external
void SetFromInt(
int color);
103 proto external
void Add(Color other);
105 proto ref Color AddNew(Color other);
107 proto external
void Sub(Color other);
109 proto ref Color SubNew(Color other);
111 proto external
void Mul(Color other);
113 proto ref Color MulNew(Color other);
115 proto external
void Div(Color other);
117 proto ref Color DivNew(Color other);
121 proto external
float GetLuminance();
123 proto external
void Saturate();
125 proto external
void Clamp(
float min,
float max);
130 proto external
void Lerp(Color other,
float t);
135 proto ref Color LerpNew(Color other,
float t);
137 proto external
int PackToInt();
146 static proto
void UnpackInt(
int argb, out
int a, out
int r, out
int g, out
int b);
148 proto external
void SRGBToLinear();
150 proto external
void LinearToSRGB();
152 proto external
bool IsZero();
154 proto external
bool IsEqual(Color other,
float epsilon = 0.0);