Context. Modeling the surface brightness distribution of stars is of prime importance to interpret the large amount of available interferometric, spectropolarimetric, or photometric observations. Beyond stellar physics, this is also a prerequisite to characterize exoplanets or our Galaxy. Nevertheless, this remains quite challenging for cool stars as it requires one to model the magnetohydrodynamic turbulence that develops in their convective envelope. Aims. In Paper I (Raynaud, R., Rieutord, M., Petitdemange, L., Gastine, T., & Putigny, B. 2018, A&A, 609, A124), the effect of the Coriolis acceleration on the surface heat flux has been studied by means of hydrodynamic simulations. In this paper, we aim to investigate the additional effect of dynamo magnetic fields that can be generated in the thick convective envelopes of cool stars. We focus on an envelope thickness that is representative of either a ∼0.35 M⊙ M dwarf, a young red giant star or a pre-main sequence star. Methods. We performed a parametric study using numerical magnetohydrodynamic simulations of anelastic convection in thick rotating spherical shells. The stratification in density ranges from a few tens to a few hundreds. The setup assumes a constant entropy jump between the inner and outer layers to force convection, with stress-free boundary conditions for the velocity field. The magnetic Prandtl number was systematically varied in order to vary the magnetic field intensity. For each model, we computed the azimuthally and temporally averaged surface distribution of the heat flux, and examined the leading-order effect of the magnetic field on the obtained latitudinal luminosity profile. Results. We identify three different regimes. Close to the onset of convection, while the first unstable modes tend to convey heat more efficiently near the equator, magnetic fields are shown to generally enhance the mean heat flux close to the polar regions (and the tangent cylinder). By progressively increasing the Rayleigh number, the development of a prograde equatorial jet was previously shown to make the equator darker when no magnetic field is taken into account. For moderate Rayleigh numbers, magnetic fields can instead inverse the mean pole-equator brightness contrast (which means going from a darker to a brighter equator when a dynamo sets in) and finally induce a similar regime to that found close to the onset of convection. For more turbulent models with larger Rayleigh numbers, magnetic fields alternatively tend to smooth out the brightness contrast. This general behavior is shown to be related to the quenching of the surface differential rotation by magnetic fields and remains valid regardless of the magnetic morphology. Conclusions. Mean global trends regarding the impact of rotation and magnetic fields on the surface brightness distribution of cool stars are theoretically depicted and need to be tested by future observations. This work opens the door to more detailed theoretical studies including the effect of nonaxisymmetric and time-variable surface features associated with magnetic activity.