Not being a biologist, I will give you a physics perspective.
Each compound is a certain color. If the petal of a flower is a
vivid red color, for example, it is because the compounds present on
the outside of that petal like to absorb all colors except for red. The
same argument is true for blue, yellow, or any other color. If you take
blue, red and yellow paint and mix it together, you get brown or black
paint as a result. This is because the different compounds, when mixed
together, will tend to absorb all colors of light, leaving little or no
light to bounce back into your eye.
When something dies, many of the compounds that make it up will
tend to get mixed together as it decomposes, and some of the compounds
that made it up will decompose into new compounds that were not present
before death. The result is that you often end up with a brownish or
blackish color, just like when you mix lots of paint colors together.
(published on 10/22/2007)