They’re not all white – their colour depends on their surface temperature. Red stars are small and cool, blue stars big and hot. In between are orange, yellow (like our Sun) and white stars.
See Samantha and Angharad’s answers. Not all stars are white. A star’s colour depends on what wavelength of light it sends out, and the wavelength of light sent out in turn depends on the star’s temperature. “White” light is made up of light of all wavelengths (all the colours of the rainbow), and stars which look white send out light of all wavelengths.
Comments