Can't assign the value of Alpha to the Renderer during the Lerp

I’m using 2 simultaneous functions, one of which changes the colour of an object, and the second changes the Alpha of that same object. I’m already using Color.Lerp on the first one, so I can’t use it on the second one (otherwise, it will override the action of the 1st function)

My code is:

while (timer < time) {
			timer += Time.deltaTime ;
			theObjectColor = endColor;
			float theObjectAlpha = theObject.renderer.material.color.a ;
			theObjectAlpha = Mathf.Lerp(1,0, timer/time);
			Debug.Log (theObjectAlpha);
			yield return null;
		}

The Debug.Log shows the right outcome but I can’t assign it to theObject’s alpha.
And when I try to assign it directly, I get the error “Cannot modify a value type return value of `UnityEngine.Material.color’”

How can I assign it to the renderer’s alpha?
Is there something similar to the “new Vector3()” technique, but for floats?

Thanks in advance

while (timer < time) {
timer += Time.deltaTime ;
theObjectColor = endColor;
float theObjectAlpha = theObject.renderer.material.color.a ;
theObjectAlpha = Mathf.Lerp(1,0, timer/time);

    // This line takes the current color values for RGB and new Alpha of the material of that object and assigns it to that object
    theObject.renderer.material.color = new Color(theObject.renderer.material.color.r, theObject.renderer.material.color.g, theObject.renderer.material.color.b, theObjectAlpha);

    Debug.Log (theObjectAlpha);
    yield return null;
}