RGBAColor is a class that represents a color with red, green, blue and alpha components.

Hierarchy

Constructors

  • Parameters

    Returns RGBAColor

  • Creates a new RGBAColor with the given red, green, blue and alpha components.
    Color values should be in the range [0, 1].

    Parameters

    • r: number
    • g: number
    • b: number
    • a: number

    Returns RGBAColor

Accessors

  • get a(): number
  • Returns number

  • set a(val): void
  • Parameters

    • val: number

    Returns void

  • get isRGBAColor(): boolean
  • Returns boolean

Methods

  • Clones this color.

    Returns this

  • Sets this color's red, green and blue value from the provided array or array-like.

    Parameters

    • array: number[]

      the source array or array-like.

    • offset: number = 0

      (optional) offset into the array-like. Default is 0.

    Returns this

  • Parameters

    • color: Color
    • alpha: number

    Returns this

  • Parameters

    Returns this

  • Parameters

    Returns this