Text Mesh, change color

Hi everyone, I have this code here, attached to an object with Text Mesh ans Mesh Renderer:

function Update () {
    var myTextMesh = (GetComponent(TextMesh) as TextMesh);
    renderer.material.color = Color.black;
    myTextMesh.text = "name";
}

Its works fine, but if change a little bit, like:

var newcolor : Color = Color.black;
function Update () {
    var myTextMesh = (GetComponent(TextMesh) as TextMesh);
    renderer.material.color = newcolor;
    myTextMesh.text = "name";
}

or ( this is what I want )

function Update () {
    var myTextMesh = (GetComponent(TextMesh) as TextMesh);
    renderer.material.color = transform.parent.renderer.material.color;
    myTextMesh.text = "name";
}

The text becomes invisible!!! What can I do?

Presumably the color you're using has an alpha value of 0. Change the alpha of the color to 1 instead.