If your plant is exposed to high temperatures, it will respond to such stress by producing more purple pigment, which can occur in leaves, stems, and any other plant parts.
A lack of nutrients in the soil can lead to purpling. This particularly happens when the soil lacks nitrogen, which is responsible for the green color.
If you haven’t fertilized your indoor plants for a while, do it to fix the issue quickly. If this method fails, I recommend repotting your plant making sure you use fresh potting soil.
Spider mites, whiteflies, and other pests typically feed on the plant sap and, in that way, they weaken the plant and it responds to this stress by displaying purple leaves or stems.