A photonic crystal (PC) sensor that can selectively detect organic vapors through visual color changes has been proposed. The sensor was fabricated by infiltrating a tetraphenylethene polymer (TPEP) into the voids of SiO2 inverse opal photonic crystal. When the sensor was exposed to tetrahydrofuran or acetone vapor, a red shift of the stopband of more than 50 nm could be clearly observed; meanwhile, the film s color changed from violet to cyan. Subsequently, when exposed to air, the stopband underwent a blue shift and the color returned to violet. The reason for the observed change is that a reversible adsorption-desorption process occurs on alternate exposure of the sensor to organic vapor and air, due to the high specific surface area of the inverse opal macroporous structure and the high affinity of TPEP to tetrahydrofuran and acetone. The adsorption of vapor analyte can increase the PC s effective refractive index, which will induce the stopband red shift and the resulting color change according to Bragg s Law. The reversible adsorption-desorption of organic vapors varied the effective refractive index of the sensor repeatedly, causing the reversible stopband shift and color change, and providing a general method for the design of visual vapor sensors.