In this work, we investigate the properties of strange quark matter (SQM) and color-flavor-locked (CFL) quark matter under zero temperature or strong magnetic fields within MIT bag model. We find that the thermodynamical properties of CFL quark matter are strongly affected by pairing energy gap
Δ and magnetic field. The sound velocity of CFL quark matter and the tidal deformability of CFL quark stars both increase with
Δ increasing, while the central baryon density of the maximum star mass in CFL state decreases with
Δ. Specifically, the equation of state (EOS) of the CFL quark matter becomes stiffer with the increase of
Δ, and the pressure becomes anisotropic when considering the magnetic field in the CFL quark matter. Our results indicate that the mass-radius relations of the CFL quark matter within the MIT bag model can describe the recent observations of pulsars, and that the maximum mass of CFL quark star increases with the increase of
Δ. Moreover, the research results indicate that the mass of CFL quark star depends on the magnetic field strength and its orientation distributions within the magnetars, and the polytropic index of CFL quark matter decreases with the increase of star mass.