API reference
API reference
Select your platform
No SDKs available
No versions available

Color4 Class

Modifiers: open
Color4 is a class that represents a color in RGBA space. It has four properties: red, green, blue, and alpha. These properties are floats that range from 0 to 1.

Signature

open class Color4

Constructors

Color4 ( red , green , blue , alpha )
Signature
constructor(red: Float = 0.0f, green: Float = 0.0f, blue: Float = 0.0f, alpha: Float = 1.0f)
Parameters
red: Float
green: Float
blue: Float
alpha: Float
Returns
Color4 ()
Creates a new Color4 object with default values of 0 rgb and alpha = 1.0f.
Signature
constructor()
Returns

Properties

alpha : Float
[Get][Set]
The alpha component of the color, as a float between 0 and 1.
Signature
open var alpha: Float
blue : Float
[Get][Set]
The blue component of the color, as a float between 0 and 1.
Signature
open var blue: Float
green : Float
[Get][Set]
The green component of the color, as a float between 0 and 1.
Signature
open var green: Float
red : Float
[Get][Set]
The red component of the color, as a float between 0 and 1.
Signature
open var red: Float

Functions

copy ()
Signature
fun copy(): Color4
Returns
equals ( other )
Signature
open operator override fun equals(other: Any?): Boolean
Parameters
other: Any?
Returns
Boolean
hashCode ()
Signature
open override fun hashCode(): Int
Returns
Int