Changing SpriteRenderer Color of an Object at runtime

Well, im making a game where u can choose the color of a ball at a menu. But when i press the color button it only changes the color if a have the prefab selected at the Editor. On a Mobile i cant select the prefab like that, so the color changing doesnt work. Here is some screenshots of the problem. Any help will be useful.
1-Here i select the green color, but it doesnt work. You can see the color its printed on the console.
alt textalt text

2-Here i select the Prefab and do the same thing, and it works.