Starting from the propagation law of the crossspectral density function, an analytical expression for the onaxis spectrum of spherically aberrated pol y chromatic Gaussian beams diffracted at an aperture is derived, the aberration f ree result is obtained as a special case treated in the paper. Detailed numerica l calculations and physical analysis are presented. It is shown that the onaxis spectrum in the near field may be redshifted and blueshifted in co mparison wi th the aberrationfree case, and the spectral switch may also take place. In pa r ticular, the influence of spherical aberration on the behavior of spectral swit ches is illustrated.