Environmentally Responsive Photonic Polymers