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
-
Parameters
-
r: number
-
g: number
-
b: number
-
Optional a: number
-
Parameters
-
array: [r: number, g: number, b: number, a?: number]
-
Parameters
-
rgba: { a?: number; b: number; g: number; r: number }
-
Optional a?: number
-
b: number
-
g: number
-
r: number
Properties
a
a: number
b
b: number
g
g: number
r
r: number
Static Readonly black
Static Readonly blue
Static Readonly clear
Static Readonly green
Static Readonly red
Static Readonly white
Methods
toARGB
-
toArray
- toArray(): [r: number, g: number, b: number, a: number]
-
Returns [r: number, g: number, b: number, a: number]
toBGRA
-
toInt
-
Returns number
toString
-
Returns string
The RGBA values are allowed to range from 0 to 255.