The heartwood of Pterocarpus santalinus is processed to extract santalin, used primarily as a red dye in foods, cosmetics, and various crafts due to its vibrant color.