Anion sensor properties of N‐alkyl‐substituted 1,4′‐diazaflavonium bromides in methanol–water were evaluated by UV–vis spectrometry. Pronounced changes were observed in the absorption spectra of all compounds for only OH−, CO32−, and CN− among F−, Cl−, Br−, I−, OH−, CO32−, NO3−, PO43−, CN−, SO42−, HSO4−, HCO3−, SCN−, NO2−, and P2O72− ions. Two new absorption bands at 385 and 685 nm accompanying the distinct color change for OH−, CO32−, and CN− ions were observed in case of all compounds. The color changes were from pink to blue for CO32− and OH− ions and from pink to purple for CN− ion. Thanks to the distinct color change, the compounds can be used as selective colorimetric anion sensors. Linear changes of absorbance of N‐heptyl‐substituted compound at 385 nm as a function of the ion concentration were used to determine CN− ion in water samples. Detection and quantification limits of the proposed method were 0.94 and 2.82 mg/L, respectively.