change maincolor of texture

hi,
how to change maincolor of texture from script? i try this

var TextureObj:GameObject ;
function Update(){

     TextureObj.renderer.material.maincolor(1,1,1,1);

you could use :

` myObject.renderer.material.SetColor("_Color",Color(0,0,0,0.5)) ;`