Please Help: (newb) Change an item's color on touch

I want to write a script for Unity that changes an item’s color when touched, clicked etc.

Check help for: material

You have the clicking working? What item it is?

function start(){
render.material.color = color.green;
}

Function update(){
if(Input.GetMouseButtonDown){
renderer.material.color = color.red;
}
}

This should work just change the color. to the start and end color.

I think he wants it to change when you click the object, not when you click in a random spot.

void OnMouseUp() {
    //this will get called when you click on the gameObject
    renderer.material.color = Color.red;
}

void OnCollisionEnter() {
     //this will get called whenever this gameObject collides with another gameObject (or the other way around) use (GameObject variableName) as parameters for this function if you only want, for example, change the color when objects with a certain tag collide with it
    renderer.material.color = Color.green;
}

you can also use OnMouseEnter and OnMouseExit methods for when the player hovers his mouse over the gameobject

I made this one that can change the color using RGB parameters, be careful because it only change the color when you play the game, at the scene editor the object will stay with its original colors

/*                                   ***   

Script that can change a transform`s texture color.
This must be attached to an object with some texture.
The colors must be between 0 and 255.

Author: wfaria
Version: 1.0
Date: 2012-07-10

1.0 - Empty Script (2011-12-30)
                                     ***                                     */
                                     
                                   
// Red color
public var red : float = 255.0;
// green color
public var green : float = 255.0;
// blue color
public var blue : float = 255.0;
// alpha color
public var alpha : float = 255.0;

function Start () 
{
	transform.renderer.material.color = Color( red/255, green/255, blue/255, alpha/255);
}

It started saying Assets/ColorChanger.js(1,3): BCE0044: unexpected char ‘v’. So it probably has a v somewhere it shouldn’t be, and I can’t find it.