What factor determines a star's color, making it an unambiguous thermometer for a star's surface?

Answer

An intrinsic property tied to temperature

The color of a star is an intrinsic property tied directly to temperature, independent of factors like distance or apparent brightness.

What factor determines a star's color, making it an unambiguous thermometer for a star's surface?
astronomytemperatureheatcolorstar