Provided are light-absorbing polymers useful for imparting color and/or ultraviolet light screening properties to thermoplastic resins. The polymeric colorants or UV absorbers may be added during the formation of the uncolored thermoplastic polymer or melt or solution blended with other thermoplastic polymers. The polymers are prepared by polycondensation of compounds containing two activated methylene groups with aromatic dialdehydes.