The color of a star determines the temperature of its surface, which is turn is depends on the wavelenght of the light emitted by it. You need to know that a star emits light in various colors of wavelengths of the electromagnetic spectrum. If the temperature is around 3,000 K degrees, then the color of the star is red, and if it is 4,000 K degrees, then the color is orange. The color of a star is yellow, when the surface temperature is 6,000 K degrees. When it is above 8,000 K degrees, the color emitted appears white. If the temperature ranges between 20,000 K to 50,000 K degrees, then the star color is blue.