In astronomy, stellar classification is a way of grouping stars by temperature. Star temperature can be measured by looking at its spectrum, the type of light that the star shines.
Stars are also grouped into spectral types or classes by color. In general, a star's temperature determines its color, from red to blue-white. Spectral types are named with a letter. The seven main types are M, K, G, F, A, B and O. M stars are the coldest stars and O stars are the hottest. The full system contains other types that are hard to find: W, R, N, and S.