Space appears to be black because there is no light being reflected off molecules. On Earth, people see colors because the objects seen are reflecting the color back into the eyes of the viewer. This does not happen in space.
The vast majority of space is a vacuum, meaning it is mostly made up of nothing. Occasionally, nebulae and galaxies can be seen. This is because light from nearby stars is reflecting the color of the gas molecules back into the view of people. When light travels through space, if it does not hit or reflect off anything, it is "absorbed" in a sense, because it is not seen by anything.