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

Color4

Color4

class Color4
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.

Constructors

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

Properties

NameSummary
alpha
var alpha: Float
The alpha component of the color, as a float between 0 and 1.
blue
var blue: Float
The blue component of the color, as a float between 0 and 1.
green
var green: Float
The green component of the color, as a float between 0 and 1.
red
var red: Float
The red component of the color, as a float between 0 and 1.

Functions

NameSummary
equals
open operator override fun equals(other: Any?): Boolean
hashCode
open override fun hashCode(): Int
Did you find this page helpful?
Thumbs up icon
Thumbs down icon