You know what I’m talking about(if not just search up “rainbow metal toy.” This material was so cool as a kid, is it some weird element or normal metal dyed somehow?
It’s anodized aluminum. The process is different from simply painting metal, but it is effectively normal metal that has been dyed. The dye sits in a layer of aluminum oxide which is a little bit like rust, but unlike the rust that forms on iron which flakes away then penetrates deeper and causes more damage, aluminum oxide is a hard protective layer that stays on the surface, holding the coloring and preventing further damage to the metal.
If the results I’m getting from Google are what you’re talking about, it’s a very thin oxide layer on the surface of some ordinary metal like titanium or steel. The rainbow colors are a result of [thin film interference](https://en.wikipedia.org/wiki/Thin-film_interference), the same phenomenon that causes the rainbow colors in a thin layer of oil on water.
Thin-film interference is a result of light reflecting from the “top” and “bottom” (outer and inner) edges of the thin layer of material – in your case, the oxide layer. The two reflected batches of light form an interference pattern:
* If the width of the layer is ~1/4 or ~3/4 the wavelength of the incoming light, the light bouncing off the bottom of the layer is 2 * 1/4 or 2 * 3/4 = 1/2 or 3/2 a wavelength offset from the light bouncing off the top. That causes the two to cancel out, and no light of that wavelength is reflected. The same goes for any width that is an odd number of fourths of the wavelength.
* If the width of the layer is ~1/2 the wavelength of the incoming light, the light bouncing off the bottom is 2 * 1/2 = 1 wavelength offset. That causes the two waves to constructively interfere, intensifying the reflected light. The same goes for any width that is an even number of fourths of the wavelength.
Since incoming light has many colors, this same process repeats across every color in the light source. If, for example, the layer is 450 nm wide, and you shine a 600 nm light on it, one-fourth the wavelength is 150 nm, and 450 is 3 of those, so you get destructive interference. But light of 450 nm would result in the film being four (an even number) fourths of the incoming light, so you’d get constructive interference.
This means that the layer preferentially reflects certain wavelengths, which we see as color. The “rainbow” effect comes from the fact that you’re seeing the layer at different angles across its surface, which changes the length light has to travel through the layer to reach your eye (and thus which wavelengths it reflects in that direction).
This effect actually sees (or at least, saw) practical use in metalworking, where [different colors on a piece of steel can tell you how well-tempered it is](https://en.wikipedia.org/wiki/Tempering_(metallurgy)).
The material is titanium
It is nicknamed “The Rainbow Metal” in some jeweler circles because it can be anodized in an electrolyte solution to produce a variety of colors.