new Color() not working properly?


Didnt thought that would be a Problem, but I experienced a problem with coloring objects.

I use:


To Color an Instantiated Object Green. But it shouldnt be complely green (not like a neonflash green, where you cant see the object anymore)

So I created my own Color

Color BuildGreen = new Color(0,255,0);

I also tried

Color BuildGreen = new Color(0,255,0,255);
Color BuildGreen = new Color(0,255,0,0);
Color BuildGreen = new Color(0,255,0,100);

Its always the neonflash green result, no matter what.
However, if I use… its working, the object is still visible, even if its too much green. So why isnt it working properly? What I did wrong / have to change?

Thanks in advance.

Each component of Color range from 0.0f to 1.0f. You can simply switch to Color32 in your case since that accepts byte components 0 to 255 instead.