lightup on collision

I want an object to "light up" a certain color when the player collides/bumps into it. The object will fade back to the original color after a certain period of time.

What would be an ideal way to achieve this?

Thank You

I'd use the Fade script on the wiki, and something like this:

var delay = 2.0;
var lightUpColor = Color.yellow;
private var originalColor : Color;

function Start () {
    originalColor = renderer.material.color;
}

function OnCollisionEnter () {
    renderer.material.color = lightUpColor;
    yield WaitForSeconds(delay);
    yield Fade.use.Colors(renderer.material, lightUpColor, originalColor, 1.0);
}

You might need additional code depending on what you're doing exactly.

you can use material.color property and Color.Lerp method to smoothly change the color of your object.