Color
The Color class is used in the user interface and in the main game world of Armada. Colors are RGB values - each component of the color is a floating point number between 0 and 1, where 0 is no intensity and 1 is full. There is no support for alpha values in the Color class.
Properties
Name | Type | Access | Description |
---|---|---|---|
r | Number | RW | Floating point red component of the color in range 0 to 1. |
g | Number | RW | Floating point green component of the color in range 0 to 1. |
b | Number | RW | Floating point blue component of the color in range 0 to 1. |
Functions and Enumerations
- Constructors
Constructors for the Camera class.
- Color( )
Create a new color, with all elements set to 0.
- Color( r, g, b )
Create a new Color with the specified red, green and blue components.
- Color( value )
Create a Color from a packed RRGGBB value
- Color( )
- Static Functions
Functions that are called without an instance of the Color class.
- lerp( left, right, amount )
Interpolate between two Colors
- lerp( left, right, amount )
- Operators
Operators that are used with a Color instance.
- operator + ( other )
Add a Color to this Color
- operator - ( other )
Subtract a Color from this one
- operator / ( scalar )
Divide this Color by a scalar
- operator * ( scalar )
Multiply this Color by a scalar
- operator + ( other )