Astronomers tell us that the solar wind and interstellar gas clouds are over a thousand degrees and sometimes in the millions, but also that the cosmic background temperature is minus 455 degrees Fahrenheit. A thermometer in space will read somewhere between these two extremes, depending on whether it's in the sun or the shade.
Except for dense clouds around certain stars, most of the gas in space is too thin to warm anything up. Essentially, there are not enough gas particles to "bump" into — and therefore transfer heat to — an object. The solar wind, for example, buffets spacecraft with high-energy (high "temperature") ionized particles, but the collision rate is a quadrillion times less than that of gas molecules in the Earth's atmosphere.
This leaves radiation as the only heat-exchanging mechanism in most space environments. An object (or astronaut) shielded from sun and starlight will radiate away nearly all its heat, cooling to the cosmic background temperature. Such a dreadful cold can be avoided if there are warm rays to soak up.
At the Earth's distance from the sun, a space thermometer would register 45 degrees Fahrenheit — assuming roughly half its surface is absorbing sunlight.
Live Science newsletter
Stay up to date on the latest science news by signing up for our Essentials newsletter.