problem with C# color syntax

Hi,
I’m trying to script a color change in C# and I can’t get the syntax right. I declare the variable without specifying a color, then I try to set it in void Start(). If I use a word for the color it works, but I can’t get it to work with color numbers. Any help will be appreciated. Thanks.

private Color bkgColor; 

void Start(){
		bkgColor = Color.(0.7f, 0.7f, 0.7f, 1.0f);
		//bkgColor = Color.grey;
	}

Try this:

private Color bkgColor; 
 
 void Start(){
     bkgColor = new Color(0.7f, 0.7f, 0.7f, 1.0f);
     //bkgColor = Color.grey;
 }

The reason for the “new” keyword, is because you want to make a new instance(Color) and store it in the variable. I’m not sure if i’m wrong, because i’m still trying to understand some things.

But the code above should work

It worked! Thanks Sampa.