Two new kinds of dithienylpyrroles bearing anthraquinone units have been prepared by the Knorr–Paal condensation between 1,4-di(thiophen-2-yl)butane-1,4-dione and 1-/2-amino-anthraquinone. The corresponding polymer films were successfully synthesized via electropolymerization. The electrochemical, electro-optical properties and electrochromic behavior of the two polymer films were further investigated by thermogravimetric analysis, cyclic voltammetry and UV–vis absorption spectra. The results demonstrated that the two polymer films were thermally stable up to nearly 300°C. Both the two electroactive polymer films presented a stable and well-defined reversible redox process as well as multicolor electrochromic change from yellow (in the reduced state) to grey (in the neutral state) and then to blue (in the oxidized state).