We study the effects of moderately strong magnetic fields on the properties
of color-flavor locked color superconducting quark matter in the framework of
the Nambu-Jona-Lasinio model. We find that the energy gaps, which describe the
color superconducting pairing as well as the magnetization, are oscillating
functions of the magnetic field. Also, we observe that the oscillations of the
magnetization can be so strong that homogeneous quark matter becomes metastable
for a range of parameters. We suggest that this points to the possibility of
magnetic domains or other types of magnetic inhomogeneities in the quark cores
of magnetars.Comment: 12 pages, 3 figures. Version accepted for publication in Phys. Rev.