I’m trying to set the rgb color for a GameObject like so:
var tempObj = Instantiate(PlatformObj, new Vector2(1,1, Quaternion.identity);
object.GetComponent<SpriteRenderer>().color = new Color(255, 255, 45, 1);
This will result in having the object completely white. When I change the color using the color picker inside the editor it will only switch between CMYK colors.
But if I set the color of the GameObject like this it works perfect.
object.GetComponent<SpriteRenderer>().color = Color.green;
This should result in a red-ish color but instead it’s yellow.