Switchable Bragg diffraction from liquid crystal in colloid-templated structures