Simple, its during the tempering process. The colors depends on the metal content and the temperature. Purple to blue on stainless steel is typically 450-600°. Higher chromium content or a chromium coating will make most metals more resistant to tempering...