In a star like the Sun, surface magnetic activity results from the interaction between rotation, convection, and magnetic field. One of the key parameters to study the magnetic activity of stars is the Rossby number, which is the ratio between the surface rotation period of the star and the convective turnover time. The convective turnover time measures the time that takes a bubble of plasma to go from the base of the convective zone in a star like the Sun to the surface, similarly to a bubble reaching the surface in a pan with boiling water heated by the bottom. While the surface rotation period of a star can be quite easily measured with photometric observations where the passage of star spots or groups of star spots (known as active regions) generates a modulation in the lightcurves, the convective turnover time can only be estimated with stellar models. Several relations have been derived to estimate this quantity using observed colors (such as B-V) and based on stellar models. Another relation provides the fluid Rossby number that is based on 3D simulations of the convection and magnetic activity. That latter relation uses fundamental parameters of the stars such as mass, radius, luminosity, and the depth of the convection zone. In the last decade, asteroseismology (the study of acoustic modes in stars) has proved its ability to infer very precise stellar parameters with space missions like CNES/ESA CoRoT or NASA Kepler. In particular, the depth of the convection zone can be measured with a high precision as the modes probe the different internal layers of the stars. Here, we take advantage of the LEGACY stars observed by Kepler, a sample of 62 stars of spectral type F and G for which solar-like oscillations were detected and detailed seismic modeling was done. This led to to two relations to infer the convective turnover time from the knowledge of the B-V color as well as the Gaia Gbp-Grp for stars in the same regime as the LEGACY sample. Since surface rotation periods have been measured recently for more than 55,000 stars observed by Kepler, we computed the Rossby numbers for more than 39,000 stars and compared them to the photometric index of magnetic activity, Sph. This photometric index measures the standard deviation of the light curve and is basically a measure of the area with spots on the stellar surface.