rgba
Shared
Packs a colour's components into a single ARGB number, with the opacity from 0 to 1.
int rgba(int red, int green, int blue [, float alpha = 1])
Parameters
| Name | Type | Description |
|---|---|---|
| red | int | The red, from 0 to 255. |
| green | int | The green, from 0 to 255. |
| blue | int | The blue, from 0 to 255. |
| alpha | float | The opacity, from 0 to 1.default 1 |
Returns
The colour as a number. If an argument is invalid, opaque black.
Example
dxDrawRectangle(10, 10, 200, 40, rgba(0, 0, 0, 0.6))