Spectral types are named with a letter : M , K , G , F , A , B and O. M stars are the coldest stars and O stars are the hottest . Most stars are currently classified using the letters O , B , A , F , G , K , and M ( usually memorized by astrophysicists as `` Oh , be a fine girl\/guy , kiss me '' ) , where O stars are the hottest and the letter sequence indicates successively cooler stars up to the coolest M class . According to informal tradition , O stars are called `` blue '' , B `` blue-white '' , A stars `` white '' , F stars `` yellow-white '' , G stars `` yellow '' , K stars `` orange '' , and M stars `` red '' , even though the actual star colors perceived by an observer may deviate from these colors depending on visual conditions and individual stars observed .