Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • RGBA

Index

Constructors

constructor

  • new RGBA(r: number, g: number, b: number, a?: number): RGBA
  • new RGBA(array: [r: number, g: number, b: number, a?: number]): RGBA
  • new RGBA(rgba: { a?: number; b: number; g: number; r: number }): RGBA
  • remarks

    The RGBA values are allowed to range from 0 to 255.

    Parameters

    • r: number

      An r component.

    • g: number

      An g component.

    • b: number

      An b component.

    • Optional a: number

      An a component. Defaults to 255.

    Returns RGBA

  • remarks

    The RGBA values are allowed to range from 0 to 255.

    Parameters

    • array: [r: number, g: number, b: number, a?: number]

    Returns RGBA

  • remarks

    The RGBA values are allowed to range from 0 to 255.

    Parameters

    • rgba: { a?: number; b: number; g: number; r: number }
      • Optional a?: number
      • b: number
      • g: number
      • r: number

    Returns RGBA

Properties

a

a: number

a component of RGBA

b

b: number

b component of RGBA

g

g: number

g component of RGBA

r

r: number

r component of RGBA

Static Readonly black

black: RGBA

Static Readonly blue

blue: RGBA

Static Readonly clear

clear: RGBA

Static Readonly green

green: RGBA

Static Readonly red

red: RGBA

Static Readonly white

white: RGBA

Methods

toARGB

  • Returns RGBA

toArray

  • toArray(): [r: number, g: number, b: number, a: number]
  • Returns [r: number, g: number, b: number, a: number]

toBGRA

  • Returns RGBA

toInt

  • toInt(): number
  • Returns number

toString

  • toString(): string
  • Returns string