Astronomical images are constructed from digital data collected by a variety of electronic sensors. Most of these operate in parts of the spectrum outside of the range of human vision. To create an image from this data it is necessary to represent it in "false" colors.
A "true" color image or photograph recreates what our eyes would see under natural conditions. Human eyes are generally able to distinguish three distinct bands of light: red, green, and blue. All colors we can perceive are simply combinations of these three bands. One way to create a "true" color image is to take three black and white images through red, green, and blue filters. Each of these grayscale images can be mapped to its respective color and combined to form a color image.
Data collected by astronomical detectors, which may be at wavelengths of light far outside of the range of human vision, may be represented similarly as grayscale images. Three of these images may likewise be mapped to red, green, and blue and overlaid to form a color image. The colors in the image do accurately represent variations in the brightness of the object at the observed wavelengths, but they are often dubbed "false" since they do not represent the visible light, or naked eye, appearance.
It is also possible to add color to a single grayscale image to improve visibility or to better highlight certain important features. This is done by associating a set of colors directly with brightness levels in the grayscale image. In this kind of image the colors simply indicate overall intensity. Any number of different color ramps can be used but all convey exactly the same information.