OnMouseEnter random hover color

i would like to know how to set a random color for a mouse hover here is my first try with random, is my array wrong?

  // old : renderer.material.color = Color.gray;

    var arrayHovercolor = new Array(renderer.material.color);
        arrayHovercolor.Push (Color.gray);  
        arrayHovercolor.Push (Color.green);
        arrayHovercolor.Push (Color.blue);
        arrayHovercolor.Push (Color.red);
        arrayHovercolor.Push (Color.white);
        arrayHovercolor.Push (Color.black);
        arrayHovercolor.length = 6;         

            var randomColor = renderer.material.color;
            randomColor = arrayHovercolor(Random.Range(0,arrayHovercolor.length));
            print("i hover here"); //debug

These should fix it:

//you used a colour here - it only takes an int for size
var arrayHovercolor = new Array();

and

//square brackets for accessing array items
randomColor = arrayHovercolor[Random.Range(0,arrayHovercolor.length)];

//don't forget to set the material's colour to the picked color
renderer.material.color = randomColor;

You also don't need this line, so add var to the randomColor = line above:

var randomColor = renderer.material.color;

Try:

renderer.material.color =
    arrayHovercolor(Random.Range(0,arrayHovercolor.length));

(Assuming UnityScript doesn't differ from C# in this respect, Color is a value type rather than a reference type, so you can't acquire a reference to it as you appear to be trying to do currently.)

thank you very much now i solved it :

function OnMouseEnter(){ 
        var arrayHovercolor = new Array();
            arrayHovercolor.Push (Color.gray);  
            arrayHovercolor.Push (Color.green);
            arrayHovercolor.Push (Color.blue);
            arrayHovercolor.Push (Color.red);
            arrayHovercolor.Push (Color.white);
            arrayHovercolor.Push (Color.black);
                    renderer.material.color = arrayHovercolor[Random.Range(0,arrayHovercolor.length-1)];
                print("i hover here"); //debug
}

how can I integrate this code in my HTML?