The underlying continuous spectrum of a star is determined by its blackbody radiation. According to Wien's Law,

lambdamax = 3,000,000 nm-K / T,

the spectrum of a hotter star peaks at a shorter wavelength, and therfore looks bluer than a cooler star.