Measurements of the nonlinear optical (NLO) response (molecular first hyperpolarizability, β) of two pH-switchable dyes were performed by means of hyper-Rayleigh scattering (HRS) over a wide range of laser wavelengths and pH values. The extensive wavelength-dependent NLO data combined with linear optical spectroscopy allow the results to be related to the electronic structures of the push–pull systems and the NLO switching contrast to be optimized. The results are modeled theoretically using a vibronic β dispersion model including both homogeneous and inhomogeneous broadening, yielding a full wavelength dependence of β, as well as of its switching contrast. The hyperpolarizabilities measured for the basic “on”-states are the highest ever reported for such compounds, reaching over 200 × 10–30 esu in the static limit and over 2700 × 10–30 esu at resonance. By combining a high intrinsic contrast in the static hyperpolarizability β0 with a large shift in resonance, an extremely large range in contrasts of the...