Class Color4

A color that supports RGBA format.

Constructors

Properties

Accessors

Methods

Constructors

  • Creates a new color.

    Parameters

    • Optional red: number

      Red value of the color in range from 0 to 255.

    • Optional green: number

      Green value of the color in range from 0 to 255.

    • Optional blue: number

      Blue value of the color in range from 0 to 255.

    • Optional alpha: number

      Alpha value of the color in range from 0 to 1.

    Returns Color4

Properties

alpha: number

The alpha value of the color in range from 0 to 1.

Default

1
blue: number

The blue value of the color in range from 0 to 255.

Default

255
green: number

The green value of the color in range from 0 to 255.

Default

255
red: number

The red value of the color in range from 0 to 255.

Default

255

Accessors

Methods

  • Parameters

    Returns boolean

    Wheter the color equals to another one.