Star Colour-Temperature Calculator Formula

Understand the math behind the star colour-temperature calculator. Each variable explained with a worked example.

Formulas Used

Peak Wavelength

peak_nm = 2.8978e6 / temperature

Approximate B-V

bv_estimate = -3.684 * log10(temperature) + 14.551

Variables

VariableDescriptionDefault
temperatureSurface Temperature(K)5778

How It Works

Star Colour and Temperature

A star's colour is determined by its surface temperature. Hotter stars appear blue-white; cooler stars appear orange-red.

Peak Wavelength (Wien's Law)

lambda_max = 2.8978e6 / T (nm)

Approximate B-V from Temperature

B-V ≈ -3.684 log10(T) + 14.551

This empirical fit works reasonably for main-sequence stars between 3000 and 30 000 K.

Worked Example

A blue star at 10 000 K.

temperature = 10000
  1. 01Peak = 2 897 800 / 10000 = 289.8 nm (ultraviolet)
  2. 02B-V ≈ -3.684 × log10(10000) + 14.551
  3. 03= -3.684 × 4 + 14.551 = -0.185
  4. 04Negative B-V: more blue than visual light, appears blue-white.

Frequently Asked Questions

Why do hot stars look blue and not ultraviolet?

While their peak emission is in the UV, they still emit plenty of visible blue light, which our eyes detect. We cannot see UV.

What colour is a 3000 K star?

Deep red-orange, like Betelgeuse. The peak is in the near infrared, but enough red visible light is emitted to be easily seen.

How does this relate to everyday colour temperature?

Light bulb colour temperatures use the same concept. A 2700 K bulb is warm/yellow; a 6500 K bulb is cool/bluish daylight.