A colored, transparent film-forming composition consisting of (a) a reaction product of an epoxy group-containing alkoxysilane (a-1) selected from the group consisting of γ-glycidoxypropyltrimethoxysilane, γ-glycidoxypropylmethyldimethoxysilane and γ-glycidoxypropyltriethoxysilane and an amino group-containing alkoxysilane (a-2) selected from the group consisting of γ-aminopropyltrimethoxysilane, γ-aminopropyltriethoxysilane, N-(β-aminoethyl)-γ-aminopropyltrimethoxysilane, N-(β-aminoethyl)-γ-aminopropylmethyldimethoxysilane and N-(β-aminoethyl)-γ-aminopropyltriethoxysilane, (a-2) having active hydrogen therein and the weight ratio of (a-1) to (a-2) in the reaction is 6:4 to 9:1, (b) an acid catalyst, (c) an alkali-soluble UV absorber, (d) at least one organic solvent having a boiling point of 100 to 250° C., (e) a dye and/or a pigment and, optionally, (f) a stabilizer selected from the group consisting of salicyclic acid, fumaric acid, crotonic acid, succinic acid, tartaric acid, and mixtures thereof.