Constructor
new Color(red, green, blue, alpha)
Creates a new Color with the given red, green, blue, and alpha components.
Parameters:
Name | Type | Description |
---|---|---|
red | number | The red component of the color. |
green | number | The green component of the color. |
blue | number | The blue component of the color. |
alpha | number | The alpha component of the color. |
- Source
Classes
Members
alpha
The alpha component of the color.
- Source
alpha
The alpha component of the color.
- Source
blue
The blue component of the color.
- Source
blue
The blue component of the color.
- Source
green
The green component of the color.
- Source
green
The green component of the color.
- Source
red
The red component of the color.
- Source
red
The red component of the color.
- Source
Methods
(static) default_color() → {Color}
Returns the default color, which is a fully transparent black.
- Source
Returns:
The default color.
- Type:
- Color
(static) lerp(color1, color2, t) → {Color}
Linearly interpolates between two Colors given a progress value.
Parameters:
Name | Type | Description |
---|---|---|
color1 | Color | The start color. |
color2 | Color | The end color. |
t | number | The progress value. |
- Source
Returns:
- Type:
- Color