Sprite color changes in inspector but not in game


I’m using this code to change the sprite’s color when i collide with it.

		SpriteRenderer renderer = GetComponent<SpriteRenderer>();
		renderer.color = new Color(0, 1, 0, 1); 

I have a debug message that tells me I’ve collided with the object and the color changes in the inspector but the sprite color stays the same. If i try to change the sprite color with the inspector while the game is running it also changes. This code worked fine with unity 5 but isn’t with unity 5.5.0a6

Meet this trouble with colors.
For me works
renderer.color = new Color32(byte r, byte g, byte b, byte a);
With Color, not Color32 I`ve got troubles too.

you need to add an oncollision function so when on collision the color will change can u post your code here?