Color coding help for lua?!

Hey!

I have been troubled with this thought, as I am extremely new to lua and have been editing some basic lua files and I wish to change the color on the entity…
… So I remember reading somewhere that I could use a color wheel which would figure the color codes for me, but this came up with 3 codes for the thing which I want to change, but it shows 4 in the script!

Here, I’ll show you: Color(215, 250, 80, 255) <-- So I need to change these 4 I believe in order for the entity in GMod to change color.

I’ve looked on this site and found just 3 bits of code.

I need an explanation on how I can make this work? Or why there’s 4 bits of code on the script for changing color, compared to 3 on the site for changing color!

Thanks!

The fourth argument is alpha (transparency).

The fourth argument to the color function is the alpha, or the transparency of the color. 0 is completely transparent, while 255 is completely opaque.

Edit: Ninja’d

First are RGB, fourth is alpha which is 255 – opaque – by default if you don’t provide an argument.

[editline]25th May 2015[/editline]

Ninja’d

Thanks guys!