The color for each planets' approval does not coincide with the above modifiers. You can use the over all color as Willythemailboy said. But the colors you see on you planet list are different for each planet and don't give an idication of how the vote will go. I just go by the number and not the color.
To win the elections for Republic through Federation you just need a vote total that is greater than any other party. As Willy said, the color of your approval rating will help determine if you will win. I never checked to see how accurate that idication is. But you do not need to get a higher vote for the better government types. Which is why I think its odd that the game will ask you if you want to change. Why wouldn't you? There are no minuses to the higher government techs, only pluses. BTW.. the tech tree should show the plus to you economy walong with the pluses to democracy and influence.
Anyway, yes its kind of cheesy that you can change the tax rate for one week and still win the election. But thats just the way it is.I tend to be over anyway just trying to keep all planets growing all the time; keeping the highest populated worlds at 42% means that the smaller and newer planets will have very high morale.