Color¶
Color is a data type that represents a color.
The alpha property is between 0 and 1. 0 is fully transparent and 1 is fully visible.
Not newable
This object cannot be created by scripts using Instance.New().
Properties¶
R : number¶
Red color component
G : number¶
Green color component
B : number¶
Blue color component
A : number¶
Alpha (opacity) color component
Methods¶
New → Color¶
Parameters: ``
Creates a new Color with the set R, G, B and A values
New → Color¶
Parameters: d [ number ]
Creates a new Color with the set R, G, B and A values
New → Color¶
Parameters
r [ number ]
g [ number ]
b [ number ]
Creates a new Color with the set R, G, B and A values
New → Color¶
Parameters
r [ number ]
g [ number ]
b [ number ]
a [ number ]
Creates a new Color with the set R, G, B and A values
Random → Color¶
Parameters: ``
Returns a random color with an alpha value of 1.
FromHex → Color¶
Parameters: hex [ string ]
Creates a new Color from the specified hex value.
Lerp → Color¶
Linearly interpolates colors a and b by t.