Traditionally, the properties and functions of covalent organic frameworks (COFs) are defined by their constituting building blocks, while the chemical bonds that connect the individual subunits have not attracted much attention as functional components of the final material. We have developed a new series of dual-pore perylene-based COFs and demonstrated that their imine bonds can be protonated reversibly, causing significant protonation-induced color shifts toward the near-infrared, while the structure and crystallinity of the frameworks are fully retained. Thin films of these COFs are highly sensitive colorimetric acid vapor sensors with a detection limit as low as 35 μg L-1 and a response range of at least 4 orders of magnitude. Since the acidochromism in our COFs is a cooperative phenomenon based on electronically coupled imines, the COFs can be used to determine simultaneously the concentration and protonation strength of nonaqueous acid solutions, in which pH electrodes are not applicable, and to distinguish between different acids. Including the imine bonds as function-determining constituents of the framework provides an additional handle for constructing multifunctional COFs and extending the range of their possible applications.