We generalize the Bergman-Milton spectral representation, originally derived for a two-component composite, to extract the spectral density function for the effective dielectric constant of a graded composite. This work has been motivated by a recent study of the optical absorption spectrum of a graded metallic film [Huang and Yu, Appl. Phys. Lett. 85, 94 (2004)] in which a broad surface-plasmon absorption band was shown to be responsible for enhanced nonlinear optical response and an attractive figure of merit. It turns out that, unlike in the case of homogeneous constituent components, the characteristic function of a graded composite is a continuous function because of the continuous variation of the dielectric function within the constituent components. Analytical generalization to three-dimensional graded composites is discussed, and numerical calculations for multilayer composites are given as a simple application. © 2005 The American Physical Society.