What basis did scientists use in determining the color and temperature of stars?

Stellar.