Color

A color with red, green, blue, and alpha components.

Constructor

new Color(red, green, blue, alpha)

Creates a new Color with the given red, green, blue, and alpha components.

Parameters:
NameTypeDescription
rednumber

The red component of the color.

greennumber

The green component of the color.

bluenumber

The blue component of the color.

alphanumber

The alpha component of the color.

Classes

Color

Members

alpha

The alpha component of the color.

alpha

The alpha component of the color.

blue

The blue component of the color.

blue

The blue component of the color.

green

The green component of the color.

green

The green component of the color.

red

The red component of the color.

red

The red component of the color.

Methods

(static) default_color() → {Color}

Returns the default color, which is a fully transparent black.

Returns:

The default color.

Type: 
Color

(static) lerp(color1, color2, t) → {Color}

Linearly interpolates between two Colors given a progress value.

Parameters:
NameTypeDescription
color1Color

The start color.

color2Color

The end color.

tnumber

The progress value.

Returns:
Type: 
Color