How do I fill a texture with one color?

How do I fill a texture with one color, like red for example. I tried this;

var fillColor : Color = Color(1, 0.0, 0.0);
 
tex2.SetPixels( fillColor, 0 );
  
tex2.Apply();

But that does obviously not work, so how would I go about doing this?

Also posted here: http://forum.unity3d.com/threads/131205-How-do-I-fill-a-texture-with-one-color?p=885701#post885701

Alright, this seem to work:

var fillColor : Color = Color(1, 0.0, 0.0);
var fillColorArray =  tex2.GetPixels();

for(var i = 0; i < fillColorArray.Length; ++i)
{
	fillColorArray *= fillColor;*

}

tex2.SetPixels( fillColorArray );

tex2.Apply();

Texture2D targetTexture= new Texture2D(originalTexture.width, originalTexture.height);
GetComponent().material.mainTexture = targetTexture;

		for (int y = 0; y < originalTexture.height; y++) {
			for (int x = 0; x < originalTexture.width; x++) {

				targetTexture.SetPixel(x, y, Color.green);

			}
		}

		targetTexture.Apply();