Sprite not updating color.

Hey all,

I’m trying to set a sprite’s color at runtime. I believe my code is correct but it is not currently working. The Debug statement returns the values I expect but the sprite is not updating. The script is attached to the sprite itself.

using UnityEngine;
using System.Collections;

public class PuzzleBackground : MonoBehaviour {
	public SpriteRenderer spriteRenderer;
	Color [] colors = {new Color(54,196,152), new Color(114,213,127), new Color(219,128,183), 
					   new Color(127,201,255), new Color(237,237,128), new Color(166,153,222), 
					   new Color(242,143,86), new Color(103,208,213), new Color(51,167,179)};
	// Use this for initialization
	void Start () {
		spriteRenderer = gameObject.GetComponent<SpriteRenderer>();
		RandomColor ();

	void Update(){

	public void RandomColor(){
		spriteRenderer.color = colors[Random.Range (0, colors.Length)];
		Debug.Log (spriteRenderer.color);

Any ideas?

Color uses floats in the range of 0.0 to 1.0. All the colors you have will be the same (namely, white).