Color
Inherits from Object. Is a struct, meaning that assignments will create copies and comparisons will return true if all fields are equivalent.
Initialization
Color takes four ints R, G, B, and A as parameters when initializing. Values are between 0 and 255.
# create a 255,255,255,255 color
color = Color();
# create a 128,56,48,255 color
color = Color(128, 56, 48);
# create a 128, 56, 48, 128 color
color = Color(128, 56, 48, 128);
# create a color from hex string
color = Color("#FF0000");
Fields
Field
Type
Readonly
Description
R
int
false
Red
G
int
false
Green
B
int
false
Blue
A
int
false
Alpha
Functions
Function
Returns
Description
ToHexString()
string
Converts the color to a hex string
Gradient(a: Color, b: Color, fade: float)
Color
Returns a gradient color between a and b using the fade value.
Last updated