Gold and blue pipes result because the exhaust is running too hot. There are three reasons for this. The first, most common reason, is that the bike is running lean. A lean mixture causes exhaust temperature to rise very sharply. A slightly rich mix WILL NOT CAUSE BLUED OR YELLOWED PIPES.
However, a *VERY* rich mix can result in an extreme case of bluing. This happens when the mix is not completely burned in the combustion chamber, (either due to a too rich mix, malfunctioning coil, burned valve, improper timing, or whatnot) and rather ignites INSIDE THE EXHAUST. This can result in an exhaust pipe that GLOWS RED while the bike is running. Only in this extreme case can a too-rich mixture cause bluing.
The common myth that blue is lean and gold is rich (or the reverse) is just that. A myth.
Third, long periods of idle can cause pipes to blue because there isn't any airflow to blow off the heat. (Some people let their bikes idle WAY too long upon start up before they take off)
Some pipes can not be restored to the original chrome finish. Others can come back close with using Blue Away.
If the pipe(s) doesn't come back to looking like you want, chances are there is an exhaust cover (chrome plated) you could put on the pipes so the blue doesn't show