What directly determines the visible color of a star?

Answer

Its surface temperature

The visible color of a star is directly tied to its surface temperature. Blue light has a shorter wavelength, requiring a fiercely hot surface temperature to be emitted.

What directly determines the visible color of a star?
lifespanstarsblue stars