We can determine the temperature of a star by looking at its color. Redder materials are cooler, while blue-white stars are very hot stars; then there are gradations in between.