Changes in the solar surface area covered by small-scale magnetic elements are thought to cause long-term changes in the solar spectral irradiance, which are important for determining the impact on Earths climate. To study the effect of small-scale magnetic elements on total and spectral irradiance, we derive their contrasts from 3-D MHD simulations of the solar atmosphere. Such calculations are necessary since measurements of small-scale flux tube contrasts are confined to a few wavelengths and suffer from scattered light and instrument defocus, even for space observations. To test the contrast calculations, we compare rms contrasts from simulations with those obtained with the broad-band filter imager mounted on the Solar Optical Telescope (SOT) onboard the Hinode satellite and also analyse centre-to-limb variations (CLV). The 3-D MHD simulations include the interaction between convection and magnetic flux tubes. They have been run with non-grey radiative transfer using the MURaM code. Simulations have an average vertical magnetic field of 0G, 50G, and 200G. Emergent intensities are calculated with the spectral synthesis code ATLAS9 and are convolved with a theoretical point-spread function to account for the properties of the observations optical system. We find reasonable agreement for simulated and observed intensity distributions in the visible continuum bands. Agreement is poorer for the CN and G-Bands. The analysis of the simulations exhibits a potentially more realistic centre-to-limb behaviour than calculations based on 1-D model atmospheres. We conclude that starting from 3-D MHD simulations represents a powerful approach to obtaining intensity contrasts for a wide wavelength coverage and for different positions on the solar disk. This also paves the way for future calculations of facular and network contrast as a function of magnetic fluxes.