Attractive and durable surface coloration can be achieved by a process called anodization. Roughly speaking, the surfaces are carefully degreased, and imbibed with hydrofluoric and nitric acid. Silver, gold, blue, purple, pink and pale blue may be produced under the right conditions.
More specifically, anodizing is the building of a coating on the metal. This permanent oxide coating can refract and absorb light to take on extremely decorative colors A variety of means may be employed: heat, chemical, or electrolytic. The most common is electrolytic, similar to electroplating, because it is a more controlled process, yielding predictable color and uniform appearance. The layer is in fact an oxide of titanium. The mildly conductive solution usually consists of as phosphoric acid and trisodium phosphate. The voltage influences the color.
It is interesting to note that anodizing does not result in the creation of a pigment, but inference colors. The apparent color is caused by interference between certain wavelengths of light reflecting off the metal and oxide coated surface. Light passing through the oxide layer, then reflecting off of the metal, must travel farther than light reflecting directly off the surface of the oxide. If one wave pattern is out of synch with the other, they will cancel each other out, making that particular color "darker" or not visible at all. If the thickness is such that a specific wavelength of light following one path closely synchronizes with that of the other path, then the wave strength (amplitude) will be increased, and that particular color would appear brighter. When the wave patterns cancel each other, it is called destructive interference, and when they match, it is constructive interference. It is possible that the thickness will create a combination of effects at the same time. At about 110-120 VDC, the anodized titanium takes on a purple appearance, but with green highlights or reflections.
Relationship between applied voltage, thickness of titanium oxide layer, and color of titanium