The deposition of organic substances like resins, oils, tannins, gums, etc. in the innermost layers of the stem gives the secondary xylem, a dark brown color appearance.
Depositions of these substances make them hard, durable, and resistant to the attacks of microorganisms.
This innermost region is made up of dead cells with highly dignified walls and is called heartwood.