The irradiance of the Sun is modulated on all time scales. Small-scale solar magnetic elements composed of quiet-Sun network and active region plages contribute to this modulation on solar cycle time scales. The evaluation of their contrast as a function of their magnetic field strength is an important constraint for models of solar irradiance variation. In this thesis, we improve and extend the results of earlier contrast studies taking advantage of the high resolution data delivered by the balloon-borne solar observatory Sunrise during its science flights in 2009 and 2013. In addition to the high quality of the Sunrise data, access to the UV wavelengths makes these data unique in this kind of study. In the first two parts of this thesis, we find that the contrast variation with the magnetic field strength agrees qualitatively with radiative magnetohydrodynamic simulations of the quiet Sun. In particular, at a continuum wavelength around 500\,nm, the contrast does not decrease at large field strengths, indicative of having resolved these features. In addition, the contrast at all wavelengths in the quiet-Sun network is found to be higher than in solar plage, and the difference decreases with atmospheric height in accordance with empirical models of flux tubes. In the last part of this thesis, we make use of solar limb data observed by Sunrise to evaluate the contribution of stray light to the total point spread function of the telescope.