Synthesis and electrochromic properties of a methacrylate polymer containing pendant terthiophene