class
Color (shared-side)
Available since version: 0.2
This class represents rgba color.
Constructor
Color()
Parameters:
No parameters.
Constructor
Color(int r, int g, int b)
Parameters:
int
r: the red color component as value in range <0, 255>.int
g: the green color component as value in range <0, 255>.int
b: the blue color component as value in range <0, 255>.
Constructor
Color(int r, int g, int b, int a)
Parameters:
int
r: the red color component as value in range <0, 255>.int
g: the green color component as value in range <0, 255>.int
b: the blue color component as value in range <0, 255>.int
a: the alpha color component as value in range <0, 255>.
Constructor
Color(int dword)
Parameters:
int
dword: the integer representing bgra color.
Properties
int
r
Available since version: 0.3.0
Represents the red color component as value in range <0, 255>.
int
g
Available since version: 0.3.0
Represents the green color component as value in range <0, 255>.
int
b
Available since version: 0.3.0
Represents the blue color component as value in range <0, 255>.
int
a
Available since version: 0.3.0
Represents the alpha color component as value in range <0, 255>.
int
dword
Available since version: 0.3.0
Represents the total sum of color as 32 bit integer.
float
intensity
Available since version: 0.3.0
Represents the color brightness scale (Rec. 601).
Methods
set
Available since version: 0.3.0
This method sets the RGBA color components.
void set(int r, int g, int b, int a = 255)
Parameters:
int
r: the red color component as value in range <0, 255>.int
g: the green color component as value in range <0, 255>.int
b: the blue color component as value in range <0, 255>.int
a: the alpha color component as value in range <0, 255>.