Changing lens flare color

For some reason I am having problems with changing the color of a lens flare.
I am working in c# and this is what I came up with:

public GameObject sun; //I assign to the var 'sun' the light object

sun.LensFlare.Color = new Color(255,212,145,0);

But it gives me this error: Error CS1061: Type UnityEngine.GameObject' does not contain a definition for LensFlare’ and no extension method LensFlare' of type UnityEngine.GameObject’ could be found (are you missing a using directive or an assembly reference?) (CS1061) (Assembly-CSharp)

How can I change it in c#?

You need to access the lens flare component and not the gameobject. If the variable sun is the lens flare, i suggest changing its type to LensFlare rather than GameObject.

Since i dont know what the sun var is populated with, i will assume it is a gameobject with a component lensflare.

public GameObject sun = null;
private LensFlare flare = null;

void Start()
{
    if(sun != null)
        flare = sun.GetComponent<LensFlare>();
}
public void FlareColorChanger(Color color)
{
    if(flare != null)
        flare.color = color;
}

As you can see, i get the component LensFlare from the sun gameobject and store it in a variable. Then created a color changer function for the lens flare that can be accessed from any script that has a reference to this script. Hope that helps.