Brazilin is a red pigment obtained from the wood of the brazilwood family (Caesalpinia sp), and is also known as Natural Red 24. Brazilin has been used since at least the Middle Ages to dye fabric, and has been used to make paints and inks as well. The specific color produced by the pigment depends on its manner of preparation: in an acidic solution brazilin will appear yellow, but in an alkaline preparation it will appear red. Brazilin is closely related to the blue-black dye precursor hematoxylin, having one fewer hydroxyl group. Brazilein is an oxidized form of brazilin.
Many members of the genus Caesalpinia produce brazilin, including brazilwood (C. echinata) and sappanwood (C. sappan). The sappanwood is found in India, Malaysia, Indonesia and Sri Lanka, the latter being a major supplier of the wood to Europe during the early Middle Ages. Later, discovery of brazilwood in the new world led to its rise in popularity with the dye industry and eventually its over-exploitation. Brazilwood is now classified as an endangered species.