People with good color vision acuity can see traces of color in a few of the brightest stars, but most stars appear white. In large telescopes additional stars suddenly take on colors which they lacked to the unaided eye. Pictures of large nebulae in astronomy books show a magnificent array of colors but these same nebulae seem to be shades of white and gray through even substantial telescopes. It really isn't surprising that people ask "What are the true colors of these objects?" The answer, as is often the case in astronomy, is a little more complex than the question.
In short the objects really are every color in the rainbow from reds to violets. If we see the object in a large enough telescope or we photograph the object long enough we will collect enough light to see these colors. Lacking these aids we see the objects as shades of white. The reason for this change of color lies not in the objects but our eyes.
Colors fade to shades of white because our eyes contain two different visual systems - color sensitive system (cone shaped cells) and a monochrome system (rod shaped cells). The cones contain three pigments which are most sensitive to red, green and blue light. Cones are concentrated in a central region called the fovea and have very sharp focusing abilities. The rods contain a single pigment called rhodopsin. Rods surround the fovea and cannot focus an image as sharply as cones.
However the rods have one major advantage over the cones. They require only a quarter of the intensity of color light to operate. The pigment rhodopsin is sensitive to green and blue light but our brains translate all sensations of light in the rods to a shade of white. Unlike the color sensitive pigments, rhodopsin "bleaches" in intense light. During the day the dim light system is effectively turned off. As darkness increases, rhodopsin resumes its sensitivity just as the color pigments begin to stop responding to the dimming light.
So the answer to our question is "The color of the object is the color you see in a photograph if it is bright enough, otherwise it will appear to be a shade of white."
Once our eyes are adapted to darkness we can see faint light as shades of white. However the pigment rhodopsin is not very sensitive to violet light and does not see reds and oranges at all. This means that some stars which have a large amount of red light seem dimmer to our eye than a similarly bright blue star. If we look at a red, green and blue beach ball during the day, the red area may seem brighter than the green or blue areas in daylight but the green and blue area may seem brighter than the red area at night. In fact the red area may seem black. When we look through a telescope at a blue star which appears white to the eye, it will seem brighter than a similarly bright red star. The first attempts to scientifically name stars applied a Greek letter to a star in a constellation. The brightest was Alpha, the next Beta, Gamma, Delta and so on. Today we know that these brightness orderings are confused by the color of the star. Sometimes a reddish Beta, Gamma or even Delta star is really brighter than a bluish star designated Alpha. Today we never depend on the Greek letter too locate a star by brightness.
The colors we see in space are produced by a wide variety of processes. Bodies hotter than about 2600 degrees Kelvin radiate various wavelengths of visible light. One color will produce the peak intensity which is determined by the surface temperature of the body. For example, the Sun with a surface temperature of 6100 degrees Kelvin radiates most intensely in the yellow wavelengths. Some bodies simply reflect the light of nearby bright stars. Stars which are extremely hot may radiate primarily in the ultraviolet wavelengths. Ultraviolet radiation which hits interstellar gas clouds can cause the gas to illuminate much in the same way as neon signs glow. Typical colors are red from hydrogen and blues from oxygen. Other elements glow in characteristic wavelengths. Regions of galaxies where star formation is active appear bluish because shortlived stars typically radiate in the blue frequencies. Regions of the galaxies which contain only older stars typically are more yellow in hue because reds and yellows are typical of older stars.
The sources of the colors we see depend on the mechanism which produces the light. As bodies are heated to higher temperatures they begin to radiate in every shorter wavelengths. By the time a body reaches a surface temperature of about 2500 degrees (Kelvin), it is hot enough to emit red radiation (as well as a lot of infrared radiation). When a body is heated to 6100 degrees (the surface of the Sun) the red radiation is dominated by yellow wavelengths. Near 10,000 degrees the body is illuminated by blue radiation and by the time the body reaches 25,000 degrees most of its radiation is violet and ultraviolet. Temperatures can reach into the hundreds of thousands where the radiation is primarily X-rays finally becoming gamma radiation as the temperatutes reach the millions.
Heated bodies are not the only source of light. When atoms absorb ultraviolet radiation (as they do inside neon and flourescent tubes), the atoms may reradiate the energy in a series of packets at longer wavelengths. An ultraviolet photon may effectively become several visible wavelngth photons. This happens not only inside glass tubes with an electrical plasma in them. It can happen in great clouds of gas that surround new stars. Large new stars burn extremely brightly. Those few stars which reach temperatures as great as several tens of thousands of degrees produce huge amounts of ultraviolet radiation which energize the clouds of gas. As the gas reemits the radiation, this ultraviolet radiation shines as wavelengths we can see.
The specific color created by atoms in the gas depend on the particular atom and the level of energy emitted. Only specific wavelengths of light can be emitted by a given atom. Energy in an atom is stored by moving electrons farther away from the nucleus. The electrons do not have the ability to choose any distance from the nucleus - only specific levels called shells. To move outwards, an electron in a shell must absorb high energy (from ultraviolet radiation for example). To move inwards, this same electron may emit an ultraviolet photon and return to its original shell. However, the electron may also move inwards in smaller steps to intermediate shells by emitting lower (longer wavelengths) energy photons (reds, yellows, green and blues).
No matter what the actual color of the light may be (star or gas cloud), nor its source (from heated bodies or emitted radiation) it will appear to us as a shade of white if it is too dim. I have never seen the beautiful blues, greens and reds that appear in photographs of the Triffid nebula (which looks like some kind of an orchid) when I have looked at the nebula in a telescope. While the Triffid is listed as a bright nebula (in total), it simply isn't bright enough at each and every point to trigger my cones.