Stars Colours Lifecycle H-R Diagram Links

This Hubble Space Telescope view of the core of one of the nearest globular star clusters, called NGC 6397, resembles a treasure chest of glittering jewels. The cluster is located 8,200 light-years away in the constellation Ara.
Credit: NASA and the Hubble Heritage Team (AURA/STScI)
Acknowledgment: A. Cool (SFSU)"

Notice that the stars are different colours.
If you look at The Big Dipper or Saucepan [part of Orion] next time it is visible in the night sky, you will see that the stars here are different colours too.
It turns out that the colour and brightness of a star depends on how hot it's surface is, and how hot a star is depends on what mass it has.
The most massive and hottest stars are blue. Next come the white stars, followed by yellow and then red stars.
How is colour related to temperature
How is temperature related to mass?