Haematoxylum campechianum (logwood or bloodwoodtree) is a species of floweringtree in the legume family, Fabaceae, that is native to southern Mexico and northern Central America. The tree was of great economic importance from the 17th century to the 19th century, when it was commonly logged and exported to Europe for use in dyeing fabrics. The modern nation of Belize grew from 17th century English logwood logging camps. The tree's scientific name means "bloodwood" (haima being Greek for blood and xylon for wood).
Logwood was used for a long time as a natural source of dye, and still remains an important source of haematoxylin, which is used in histology for staining. The bark and leaves are also used in various medical applications. In its time, logwood was considered a versatile dye, and was widely used on textiles but also for paper.
The extract was once used as a pH indicator. Brownish when neutral, it becomes yellow-reddish under acidic conditions and purple when alkaline. In a small demonstrative experiment, if two drops, one of concentrated ammonia and one of logwood extract, are placed close enough the NH3 vapours will change to a purple shade.