Effects of color superconductivity on the structure and formation of compact stars