I tried a lot and I am trying to use RGBA values in my game. I don't really have much experience with C# and am only using it for unity. I basically need to change the color of a cube. When using basic colors like below, it works, fine, the cube turns red when this code applies.
GetComponent<Renderer>().material.color = Color.red;
But I wanted a darker shade of red and more customizable colors, so I looked it up and after searching through a website, I found out about Color32. I tried the code below, and it doesn't work, though the cube turns white instead of the specified RGBA value:
GetComponent<Renderer>().material.color = new Color32(139,0,0, 255);
I have no console errors with this code, so I'm thinking it might be the wrong way to do this. Any ideas??