You're not initializing color. So you end up with a garbage + temp1 = garbage problem.

Don't know if that's your complete problem. It just jumped out at me.