A Rainbow of Bruises.
A bruise occurs when the capillaries of a tissue experience trauma and burst. When the capillaries are damaged, blood leaks out of its vessel into the surrounding tissue. Bruises come in all shapes and sizes, and even different colors, due to the degradation of bilirubin. Bilirubin is the by-product that remains when red blood cells are broken-down.
A bruise can turn dark blue or black because the underlying capillaries die without the regular supply of oxygen they received from the blood they contained. A bruise can turn red not because of the presence of blood per say, but because of bilirubin; bilirubin is normally red in color. A bruise can turn yellow because of gluacronide; gluacronide is made when bilirubin is attached to uronic acid, making the normally fat-soluble bilirubin into a water soluble molecule. A bruise can turn brown when the bilirubin ages; the double bonds in an old molecule of bilirubin are altered, turning the normally red molecule into a brown one.
Image source here.