Currently, color-changing materials with multiple responses have emerged as a prominent research focus. In this work, two Anderson-type POMs−viologen compounds were successfully synthesized under solvothermal conditions, namely, (1,3-bcby)•[Al-Mo 6 (OH) 6 O 18 ]•(en) 0.5 •H 2 O (1) and (1,3-bcby)•[Co 2 (H 2 O) 6 TeMo 6 O 24 ]•2H 2 O ( 2) (1,3bcby = 1,1′-bis(3-cyanobenzyl)-4,4′-bipyridine dichloride, en = ethylenediamine). Compound 1 shows a two-dimensional supramolecular lattice structure through the hydrogen bonding of dissociated water molecules. In compound 2, by utilizing the connection of Co atoms, a twodimensional layered framework is constructed. Owing to the widespread application of viologen compounds in color-changing materials, an investigation was performed for exploration of the photochromic and thermochromic responses of 1 and 2 upon exposure to light and heat. The study reveals that compound 1 exhibits an exceptional reversible photochromic property, while compound 2 demonstrated equally impressive thermochromic behavior. The filter paper prepared by compound 1 was successfully applied to ink-free, erasable printing. Furthermore, ECH-1 and ECH-2 (two types of electrochromic hydrogels), were prepared through varying concentrations of compounds 1 and 2. Notably, ECH-1 exhibits a rapid response time and substantial coloring efficiency. ECH-1 and ECH-2 have been integrated into smart windows, demonstrating their capacity to modulate indoor temperatures effectively.