Ethyl(hydroxyethyl)cellulose was functionalized with protonated perichromic dyes. The systems were designed to be used for chromogenic/fluorogenic anion sensing. Films were utilized for the highly selective optical detection of CN− in water. The polymeric chain protects the sensing unit from the medium, improving the detection limit of CN− in water. The films can be reused.