Aims. One of the necessary parameters needed for the interpretation of the light curves of transiting exoplanets or eclipsing binary stars (as well as interferometric measurements of a star or microlensing events) is how the intensity and polarization of light changes from the center to the limb of a star. Scattering and absorption processes in the stellar atmosphere affect both the center-to-limb variation of intensity (CLVI) and polarization (CLVP). In this paper, we present a study of the CLVI and CLVP in continuum spectra, taking into consideration the different contributions of scattering and absorption opacity for a variety of spectral type stars with spherical atmospheres. Methods. We solve the radiative transfer equation for polarized light in the presence of a continuum scattering, taking into consideration the spherical model of a stellar atmosphere. To cross-check our results, we developed two independent codes that are based on Feautrier and short characteristics methods, respectively, Results. We calculate the center-to-limb variation of intensity (CLVI) and polarization (CLVP) in continuum for the Phoenix grid of spherical stellar model atmospheres for a range of effective temperatures (4000−7000 K), gravities (log g = 1.0−5.5), and wavelengths (4000−7000 Å), which are tabulated and available at the CDS. In addition, we present several tests of our codes and compare our calculations for the solar atmosphere with published photometric and polarimetric measurements. We also show that our two codes provide similar results in all considered cases. Conclusions. For sub-giant and dwarf stars (log g = 3.0−4.5), the lower gravity and lower effective temperature of a star lead to higher limb polarization of the star. For giant and supergiant stars (log g = 1.0−2.5), the highest effective temperature yields the largest polarization. By decreasing the effective temperature of a star down to 4500−5500 K (depending on log g), the limb polarization decreases and reaches a local minimum. It increases again with a corresponding decrease in temperature down to 4000 K. For the most compact dwarf stars (log g = 5.0−5.5), the limb polarization degree shows a maximum for models with effective temperatures in the range 4200−4600 K (depending on log g) and decreases toward higher and lower temperatures.