We see beautiful astrophotographs on social media, starting with a lunar eclipse captured by someone's telescope, to images of the Pillars of Creation nebula, our neighbor the Andromeda galaxy, and other celestial bodies featured daily on NASA’s website. These accurate, vibrantly colored images showcase galaxies that are located millions of light-years away. Despite the immense distances of these galaxies, we can see them as though we are right there in space; gazing upon those cosmic ghosts of the past, observing the gas clouds that surround them, the stars that swim nearby, and even catching glimpses of supernovae and black holes. How, then, have we managed to conquer time and space to capture the universe with such precision?
Maximum Possible Amount of Light
Let us say you want to capture a photograph of the Cat's Paw Nebula, which lies about 4,000 light-years away. First, use giant, Earth-based telescopes; similar to those found at major astronomical observatories, such as the Vera C. Rubin Observatory. These telescopes utilize cameras equipped with Charge-Coupled Devices (CCD), which are a small chip similar to the one in your phone's camera, made up of even smaller, light-sensitive sensors known as pixels that can collect and store a massive number of photons—despite their small size—then convert them into a digital signal. We simply have to point the telescope at the nebula's location, and keep the camera lenses exposed for as long as possible to collect every photon emitted by the nebula. The farther away the object we want to see is, the more photons we need to gather to view it.
Alternatively, you can use orbiting telescopes, such as Hubble and others that travel through space and use cameras to collect both visible and invisible light, such as infrared and ultraviolet rays. You can also use Hubble's successor, the James Webb telescope, which is equipped with mirrors that collect five times more light. These telescopes can see the farthest and oldest galaxies in the universe.

Image credit: LCO
From Shades of Gray to Rainbow Colors by Scientists and Astronomy Enthusiasts
Now, it might seem that we have captured the nebula, but unfortunately, no—we have just begun! It is now time to start the image processing. The image we just captured was grayscale, or more accurately, rendered in shades of gray. It is usually saved in the FITS format, which can store hundreds of data points about the nebula, such as its cosmic coordinates and other related information. The next step is to process the image and add color to it, based on the type of "filter" used during the photography process. We can use a filter to collect the green light only, followed by separate filters for the red and blue lights, to form a colored image of the nebula. After several hours or months, we will have processed images; now they are colorful and stunning.
While processing a single image may take a long time, it is no longer limited to scientists; amateurs can now participate in the process too. Most of the images captured using either observatories or telescopes are open source, allowing amateurs to download and process them for free using softwares, such as the open-source GIMP; thus, the entire processing operation becomes much faster.
UGC 1810 galaxy. Image credit: NASA, ESA, Hubble, HLA; processing and copyright: Domingo Pestana
Why all the fuss?
That was a painstaking effort just to produce one colored image of the cosmos. Despite the splendor of the colorful images of the Cat's Paw Nebula, or other nebulae and galaxies, capturing these photos helps us understand the universe and estimate its age at approximately 13.7 billion years. This is achieved through studying an image captured using the Hubble Telescope of a star known as Cepheid, or seeing the shape of the black hole at the heart of a galaxy, 55 million light-years away; appearing as a dark disc surrounded by a hot, orange cloud of dust, exactly as predicted by Einstein's theory of relativity.
Which Came First: Galaxies or Black Holes?
Recent images captured using the James Webb Telescope of a "naked black hole" challenge our theories about the universe's origin and the formation of the first celestial objects. It lies 750 million light-years away, not in the center of any galaxy, and it is surrounded by a cloud composed only of hydrogen—the oldest element in the universe. The existence of this cosmic monster alone does not align with our theory that galaxies first emerged; after the exhaustion of the stars' fuel, a black hole was formed. Yet, one image has now forced us to re-question the accuracy of our entire view of the universe.
References
ebsco.com
esahubble.org
lco.global
noirlab.edu
photographingspace.com
science.nasa.gov
youtube.com
Cover image: UGC 1810 galaxy. Image credit: NASA, ESA, Hubble, HLA; processing and copyright: Domingo Pestana