What causes the colors of meteors?

Heating of the air compressed before it.