Astronomers have known for centuries that stars have different colors. When looking at an electromagnetic spectrum, ultraviolet waves are the shortest, and infrared are the longest. The visible spectrum has wavelengths between these two extremes. 