How is temperature related to color?

I spent some time studying about temperatures and color of objects. It turns out that as we heat something it turns to red, then yellowish white and if we heat it more it turns to bluish-white.

Like we can say a blue star is hotter than a red star. But why isn't it the same with flames?

Blue flame isn't always hotter than a red flame. It's just the chemistry of it all.

I mean I know the electrons jump from one orbit to another and gets into excited state when heated.

But the questions in my mind are:

1. If one object appears blue and another red, that doesn't always mean that the blue object is hotter than red. Is that correct? If yes then how is it so? I am sorry but I'm bit confused over it.

2. With the "Color Temperature" concept on Wikipedia. They say 1,700 K to match a flame. But 15,000–27,000 K for a clear blue poleward sky.

This confuses me. The sky appears blue, does that mean its hot? But it isn't right? It's colder. I am not sure if I'm able to frame it properly. It's a bit confusing to me.

Is this something like a glowing object vs reflecting object? The sun is white but Earth is blue. But sun is hotter than the earth. It's the sun radiating light but earth is just scattering it.

But the surface temperature of sun is 5778K while the Wikipedia states our sky is about 15000K-27000... I know there's something I'm missing here. I'm hoping someone can tell me what is it.

• If an object is more hot, it has more energy. More energy means more frequency and the light will therefore be more towards the blue end. And the earth scatters sunlight while the sun emits it. Jun 1, 2014 at 9:08
• Blue flame is hotter than red flame. Jun 1, 2014 at 9:19
• @SachinShekhar: Actually, the OP is correct that for flames, it's usually the chemistry that determines the color, and not the temperature. Generally oxygen-saturated flames tend to be blue; for example, methanol and ethanol burns with a blue flame, and gasoline burns with a yellow flame, but strangely enough gasoline flames are actually hotter. Jun 1, 2014 at 12:39

1) If one object is appearing blue and other object red. That doesn't always mean blue object is hotter than red? Is that correct? If yes then how is it so? I am sorry but I'm bit confused over it.

Yes it's correct: when an object is glowing blue when burning that means it has more temperature than an object glowing red. It's because an object which is glowing blue has more energy. Energy of an object of temperature $$T$$ (in kelvins) is calculated using this equation: $$E=kT$$ where $$k$$ is Boltzmann's constant. Energy of a light with frequency $$f$$ is calculated using this equation: $$E=hf$$ where $$h$$ is plank's constant. So spectral radiance of emitted light with frequency $$f$$ from object with temperature $$T$$ is calculated using $$\beta(T) = \frac{2hf^3}{c^2}\frac{1}{e^{\frac{hf}{kT}}-1}$$. For derivation See Plank's Law. The higher the frequency of light the more energy it has and it looks 'more blue' and the lower the frequency the less energy and it looks 'more red'.

Here's very good image of "light" (light is part of spectrum we see (visible spectrum), full spectrum is called electro-magnetic spectrum, but for simplicity let's call it just light) spectrum:

Here's a very good diagram of emitted light with wavelength $$\lambda$$ from an object with temperature $$T$$ (in kelvins). (NOTE: for light with frequency $$f$$, wavelength is $$\lambda = \frac{c}{f}$$ where $$c$$ is the speed of light.)

2) With the "Color Temperature" concept on Wikipedia. They say 1,700 K for match flame. But 15,000–27,000 K for a clear blue poleward sky.

This confuses me. The sky appears blue, does that mean its hot? But it isn't right? It's colder. I am not sure if I'm able to frame it properly. It's a bit confusing to me.

Is this something like a glowing object vs reflecting object? The sun is white but Earth is blue. But sun is hotter than the earth. It's the sun radiating light but earth is just scattering it.

You can calculate spectral radiance. Spectral radiance is like an (spectral radiance isn't fully intensity, it's just like an intensity) intensity of emitted light with frequency $$f$$ from object with temperature $$T$$ (in kelvins) of emitted light from an object with temperature $$T$$ (in kelvins) using this equation:$$\beta(T) = \frac{2hf^3}{c^2}\frac{1}{e^{\frac{hf}{kT}}-1}$$ Earth is blue because it reflects light, not emits it. But the Sun doesn't reflect light (it's a blackbody, but not perfect), it just emits it, that's why it's hotter.

• This clears my doubt. But raises another doubt. If sun is so hot, why is it just white instead of blue? Do different elements show different colors at same temperature? Like two stars can be at X Kelvin but one is blue while other is white. Is that possible? If so, then can we determine beyond what temperature the sun will appear blue? Thanks for the details. Jun 1, 2014 at 10:00
• @TheCuriousEngineer sun looks red because intensity of emitted light with red color (Wavelength ~600-650nm) is more than intensity of light with higher frequency (blue) (of couse it emits "blue" (higer frequency) light too but it's intensity is smaller than intensity of "more red" (lower frequency) light), it's because sun don't has enough energy.
– G B
Jun 1, 2014 at 10:04
• @TheCuriousEngineer color white is just mixture of all common colors (Red, Green and Blue).Some Star's looks white because they emit light with different frequencies each with different Intensity (See Spectral Radiance), When red, green and blue light will "mix" you will get white color, so it will be white. If star is blue it means that it has more energy that intensity of "blue light" is higher than intensity of other colors.
– G B
Jun 1, 2014 at 10:18
• I understand that Sun gives off less of blue itself. But here I'm trying to relate temperature with color and not just intensity. If sun appears white at 5778K surface temperature then what temperature would it take in Kelvins to make it appear blue. (not practically but just assuming we could heat it up then how much we should heat it to make it appear blue). I know some stars send more intensity of a particular color. But space scientists can figure out temperature of stars by looking at their colors. That makes me think how do they determine the temperature using color. Jun 1, 2014 at 10:40
• @TheCuriousEngineer Also, Wien's displacement law applies in this case. Jun 1, 2014 at 13:28

Let me recommend the Wikipedia article on colour temperature but caution you that while that article is quite good, it says a few misleading things and, as usual, you might want to visit a library or do some more extensive online research. If you want to learn the math of how color and temperature are correlated in thermal radiation, look at the excellent article on Wien's displacement law. (Spoiler: it's peak wavelength of light = a constant / temperature or peak frequency of light = a different but related constant * temperature)

1) If one object is appearing blue and other object red. That doesn't always mean blue object is hotter than red? Is that correct?

That is precisely correct. In fact, most colors we see around us in the normal course of life are not correlated with temperature in this way. Physicists have found that the spectrum of radiation emitted by an object is correlated with the temperature of the object. If the object is hot enough, it emits visible light. The color temperature we are talking about here is temperature at which a perfect (black) radiator would emit radiation of the same average frequency.

If yes then how is it so? Most of the light we actually see around us is non-thermal; its color derives from differences in the properties of various materials. For example, the air molecules over our heads scatter blue light about eight times more readily than red light, so we see a strong blue color. To get light from a purely thermal source that was in some average sense "equally blue", you would have to heat that source to about four times the temperature of our Sun's photosphere.

The only thermal sources you see in everyday life are things like toaster wires or oven heating coils that get red-hot, the Sun and the fixed stars, and incandescent lights.
Anything you see by reflected light (including the planets and the Moon as well as most anything you see on Earth that isn't red hot or hotter), or scattered light (like the blue sky), or various kinds of non-thermal emission (lasers, LEDs, fluorescents, lightning). Even open flames – candlelight and firelight – are not thermal, a candle is no where near the thousands of degrees its color would seem to indicate; if you want to see how thermal colors work a good way is to watch glass blowers at work and look through the little window into their furnace.

If you use infrared cameras or goggles, you can see a representation of the thermal radiation from objects like people or trees or the warm exhaust from a vehicle. Look up "thermal imaging" in a search engine or a Library and you will find some pictures that show warm things as bright and cooler things darker. Remember the colors you see in such images are "false", you can't see those colors with your eyes, though you can feel them on your skin and some animals, like pit vipers, can "see" them directly with sense organs adapted to infrared light.

Note:
Confusingly, when people talk about "color temperature" they can mean several different things, especially:

1. the correlated color temperature (CCT)- that is, the temperature a blackbody (perfect thermal radiator) would need to be heated to to emit light of the same average color.

2. Some kind of "perceived color temperature" that varies depending on who is doing the color/temperature mapping. Usually this seems to run backwards from the CCT, so that red and orange are "hot" colors and blue, purple, and green are called "cool" colors, but it need not be a simple backwards map; for example, red might be called 'warm', and orange "hot", then green is "cool", and blue "cold". There is no universal list of how people rank colors psychologically or artistically in terms of temperature, in fact according to visual designers there are "warm greys" and "cool greys" that would all not even fit on the CCT scale. This means that if you are reading a book and it talks about hot or cool colors, you may have no real way of knowing what kind of color it means unless you pick it up from context in that particular book.

Also, people see color very differently from a simple spectrum analyzer; our vision is highly background and history dependent. The very same frequency that appears yellow to us in one context might seem green or orange in another context: read up on "color perception" as a topic to learn more about this.

The sky appears blue, does that mean its hot?

No, your doubts here are well justified. Blue sky is not a thermal light source. In fact, assigning it a thermal temperature is a little disingenuous as there is another way to measure "the temperature of the sky" with a telescope that gives a much more sensible answer. (you point telescope at a patch of sky and put a sort of thermometer at the focus - I assure you, you do not get 27,000 degrees for a patch of blue sky this way, but you do get the right sort of temperature for the Sun.) It would have been better to just say "If you measure the light intensity vs. frequency profile for light from this patch of blue sky, the peak intensity is blah blah, which happens to be the same as the peak frequency of the light emitted by purely thermal radiation from a star whose surface is at 25,000 degrees C, isn't that interesting?" Or some such construct.

Note that light really does have a measurable temperature in yet another way that depends on both the average frequency of the light and on how 'thermalized' the light is. In this sense, light from thermal sources like the Sun or a furnace has just the kind of temperature you read about before asking the question, but light from other sources is generally "cooler". Fluorescent light would be "cool" and laser light "extremely cold". This sense is actually the most consistent and useful way I know of to talk about light and temperature, but few people seem to use it outside of people who actually use or study atomic physics or laser physics. I believe it is likely to become more popular in the future and then people will much less often be saying confusing and silly things about the temperature of the blue sky and so on.

• Nice answer, +1. A small thing though: you say "a candle is no where near the thousands of degrees its color would seem to indicate" - The adiabatic flame temperature of most hydrocarbons is around 2,000 K. The light we see emitted from a flame is mostly 1) thermal black-body radiation from soot particles (yellow-orange) and 2) Electronic emission from the CH* radical (blue). The first of these is most certainly thermal radiation... Jun 1, 2014 at 12:07
• "the Wikipedia article [...] says a few misleading things" Of course, not everybody has the time but it would be nice if you corrected the misleading things, rather than complaining about them. Jun 2, 2014 at 0:14

The wikipedia page for Color Temperature states, "The color temperature of a light source is the temperature of an ideal black-body radiator that radiates light of comparable hue to that of the light source." Meaning, an ideal blackest-of-black object. Think a hunk of volcanic rock - generally it's very black and it looks black, but it does give off a spectrum of infrared radiation due to the black-body effect. But that's not all - it may reflect light, it may have its own color, it may have a lot of other things that don't fall under the category of "perfect black-body", in which case the laws don't [perfectly] apply.

1. If one perfect black-body appears "hotter in hue" than another, then it is hotter. However, if the objects aren't perfect black-bodies (like a bright red toy bucket compared to a bright blue toy shovel), this law does not apply. The simplest way objects can get their color is by absorbing all light that isn't that color. Such a thing is called a pigment. But if you keep asking "how does this get its color" (soap films, prisms, why the black-body curve is how it is), you'll find that things get complicated and there are lots of different ways.

2. You're right with the sun. See this demonstration: Walter Lewin, For the Love of Physics. (There's also a demonstration with cigarette smoke earlier in the lecture). The atmosphere scatters the blue light and it ends up in our eyes. The atmosphere isn't $27000\mbox{K}$.