Nanoporous photonic particles for smart coatings