rgba
The rgba
method returns an object that represents a color, with an associated opacity value. The object can be passed into other drawing functions.
Syntax
rgba ( red, green, blue, opacity )
Arguments
Argument | Description |
---|---|
red
|
(number) The red color value (0-255) |
green
|
(number) The green color value (0-255) |
blue
|
(number) The blue color value (0-255) |
opacity
|
(number) The opacity value (0-255, where 0 is transparent and 255 is opaque). |
Returns
A color object with an associated opacity value.
Example
local mycolor = rgba(255, 255, 0, 127)