The rational design of covalent organic frameworks (COFs) with hydrochromic properties is of significant value because of the facile and rapid detection of water in diverse fields. In this report, we present a thiazole-linked COF (TZ-COF-6) sensor with a large surface area, ultrahigh stability, and excellent crystallinity. The sensor was synthesized through a simple three-component reaction involving amine, aldehyde, and sulfur. The thiazole and methoxy groups confer strong basicity to TZ-COF-6 at the nitrogen sites, making them easily protonated reversibly by water. Therefore, TZ-COF-6 displayed color change visible to the naked eye from yellow to red when protonated, along with a red shift in absorption in the ultraviolet-visible diffuse reflectance spectra (UV-vis DRS) when exposed to water. Importantly, the water-sensing process was not affected by polar organic solvents, demonstrating greater selectivity and sensitivity compared to other COF sensors. Therefore, TZ-COF-6 was used to detect trace amounts of water in organic solvents. In strong polar solvents, such as N,N-dimethyl formamide (DMF) and ethanol (EtOH), the limit of detection (LOD) for water was as low as 0.06% and 0.53%, respectively. Even after 8 months of storage and 15 cycles, TZ-COF-6 retained its original crystallinity and detection efficiency, displaying high stability and excellent cycle performance.