A red solid is insoluble in water. However it becomes soluble if some $KI$ is added to water. Heating the red solid in a test tube results in liberation of some violet coloured fumes and droplets of metal appear on the cooler parts of the test tube. The red solid is :