The above processing makes it possible to obtain the color filter shown in FIG. 25B. With the present embodiment, the transparent electrode film 300 is formed beforehand on the template 302, so that the protective film 217 c and the colored layers R, G, and B are not damaged by processes such as annealing.