A paint containing titanium dioxide and semiconducting cadmium nanocrystals can convert sunlight to electricity. Christopher Intagliata reports