M MY Multiplayer: Wiki
Side
Kind

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

NameTypeDescription
redintThe red, from 0 to 255.
greenintThe green, from 0 to 255.
blueintThe blue, from 0 to 255.
alphafloatThe 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))

See also