Color

constructor(red: Float, green: Float, blue: Float, alpha: Float = 1.0f)


constructor()

Constructs a color with red, green, blue and alpha all 1.0.


constructor(red: Int, green: Int, blue: Int, alpha: Int = 255)

Constructs a color from integer components

Return

this color with its components set to the specified values

Parameters

red

the new red component

green

the new green component

blue

the new blue component

alpha

the new alpha component


constructor(colorInt: Int)

Constructs a color with components stored in a color int. Color ints are stored as packed ints as follows: (alpha << 24) | (red << 16) | (green << 8) | (blue). Each component is an 8 bit number between 0 and 255 with 0 indicating the component's intensity.

Parameters

colorInt

the color int specifying the components


constructor(color: Color)

Constructs a color with the components of a specified color.

Parameters

color

the color specifying the components