Can you eat the purple skin of pistachios?
Generally, the purple inner skin of pistachios is edible and is usually due to varietal characteristics or natural pigments. However, if signs of spoilage are present, consumption should be avoided. If in doubt, it's advisable to carefully inspect before eating. Detailed analysis is as follows:

In some pistachio varieties, the inner skin is naturally purple, or turns purple due to the accumulation of natural anthocyanins during growth. This type of purple skin has no off odor and feels dry in texture, posing no safety concerns when consumed with the kernel. It may even contain beneficial natural compounds.
If the purple discoloration of the inner skin results from moisture exposure or mold growth, especially when accompanied by unpleasant odors, stickiness, or discolored kernels, it indicates microbial contamination and possible formation of harmful substances. Consuming such pistachios may lead to gastrointestinal discomfort, including abdominal pain and diarrhea, and is therefore not recommended.
When purchasing pistachios, choose reputable sources and examine whether the purple hue on the inner skin appears natural and uniform. Consume in moderation to avoid overburdening digestion and ensure food safety.