Silver iodide is an inorganic compound with the formula AgI. The compound is a bright yellow solid, but samples almost always contain impurities of metallic silver that give a gray coloration. The silver contamination arises because AgI is highly photosensitive. This property is exploited in silver-based photography.