# Supplementary Material (ESI) for Chemical Communications # This journal is © The Royal Society of Chemistry 2010 1 Visual Indication of Enviromental Humidity by Using Poly(ionic liquid) Photonic Crystals Jing Huang, Chang-an Tao, Qi An, Changxu Lin, Xuesong Li, Dan Xu, Yiguang Wu, Xiaogang Li, Dezhong Shen and Guangtao Li* Materials Lithium bis(trifluoromethanesulfonimide) (LiTf 2 N), trimethylolpropane triacrylate (TMPTA), 2, 2’-azobisisobutyronitrile (AIBN), and methyl methacrylate (MMA) were obtained from Acros Organics. All solvents and other chemicals were supplied by local suppliers. All solvents and chemicals are of reagent quality and were used without further purification unless specially explained. Common glass slides were cut to be 50×20 mm and immerged in H 2 SO 4 /H 2 O 2 mixture for 12 hours, following rinsing with deionized water in ultrasonic bath for three times and then dried for use. All 7 ml vials for colloidal crystals growth and a reactive flask must be cleaned by rinsing with H 2 SO 4 /H 2 O 2 mixture and deionized water. PMMA slides (50 mm×20 mm×1.5 mm) as substrates for the preparation of poly(ionic liquid) films supports were cleaned with anhydrous ethanol. Synthesis of polymerizable ionic liquid 1-(2-acryloyloxyhexyl)-3-methylimidazolium bromide: The ionic liquid monomer was synthesized as shown in Scheme S1. A mixture of acrylic acid (0.72 g, 10 mmol), 6-bromo-1-hexanol (2.2 g, 12mmol), N, N’-Dicyclohexyl carbodiimide (DCC 2.5 g, 12mmol) and 4-Dimethylaminopyridine (DMAP 1.2g, 10mmol) in anhydrous CH 2 Cl 2 (150 mL) was stirred at room temperature for 24 h. After the reaction mixture was filtrated, the organic layer was washed with 4% hydrochloric acid, saturated aqueous sodium bicarbonate and brine, respectively. And then the product was dried by anhydrous magnesium sulfate, filtered and evaporated in vacuum. The last residue was purified by flash chromatography on silica gel (eluent: dichloromethane/ petroleum ether = 1/5) to afford a pale yellow liquid for the next step synthesis. A mixture of 7-bromohexylacrylate (1.5 g, 4.3 mmol) and 1-methylimidazole (0.42g, 5.1 mmol) and a small amount of 2,6-ditertbutyl-4-methylphenol (inhibitor) was stirred at 45 o C for 20 h under N 2 atmosphere, and yielded a viscous liquid. The viscous liquid was purified by the precipitation method with diethyl ether to obtain the desired monomer (viscous yellow liquid) 1-(2-acryloyloxyhexyl)-3-methylimidazolium bromide. The viscous liquid was dried under vacuum at room temperature as the pale yellow liquid. 1 H NMR (300 MHz, CDCl 3 ): 10.48 (1H, m, N–CH–N), 7.28–7.27 (2H, s, N–CH=CH–N), 6.37–6.36 (1H, m, CH 2 =CH), 6.16–6.12 (1H, m, CH 2 =CH), 5.85–5.84 (1H, m, CH 2 =CH), 4.38–4.35 (2H, t, N–CH 2 (CH 2 ) 6 O–), 4.13 (3H, s,