Final answer:
Ninhydrin turns violet when it reacts with amino acids, which are present in the proteins in skin cells transferred through fingerprints.
Step-by-step explanation:
The chemical ninhydrin reacts with amino acids to turn violet. Ninhydrin is used to detect fingerprints because it reacts with amino acids from the proteins in skin cells transferred to the surface by the individual leaving the fingerprint. When ninhydrin is heated with amino acids, it forms a purple-blue colored compound.