How to change the colour of my car?

Hello. I am developing a racing game with unity3D. I have also a shop system where you can buy Upgrades, equipment, boosters etc. and now I want to make a show for Car Designs, in which you can buy new designs for the car. How can I convert this? How can I change the colour of a prefab? Please, I need help:)

var texture1 : Texture;
var texture2 : Texture;

    function Start(){
             renderer.material.mainTexture = texture1;
    }

function Update(){
    if(buy new painting)
          renderer.material.mainTexture = texture2;}

Have a look there http://unity3d.com/support/documentation/ScriptReference/Material.html so that maybe you will find exactly what you want.