In 1801, he was experimenting with silver chloride, a chemical which turned black when exposed to sunlight. He had heard that exposure to blue light caused a greater reaction in silver chloride than exposure to red light. Ritter decided to measure the rate at which silver chloride reacted when exposed to the different colors of light. To do this, he directed sunlight through a glass prism to create a spectrum. He then placed silver chloride in each color of the spectrum. Ritter noticed that the silver chloride showed little change in the red part of the spectrum, but increasingly darkened toward the violet end of the spectrum. This proved that exposure to blue light did cause silver chloride to turn black much more efficiently than exposure to red light.