Chip off a small piece of the stucco, and bring it to a home improvement store to get color matched paint. Mismatched paint will bring attention to the repair job and possibly make it look worse, so test the paint on a less visible spot on the house before repair.
Clean the crack with the wire brush, scrubbing to remove dirt and any loose pieces of stucco. Mist the crack and the surrounding stucco with the hose, ensuring that excess water doesn't get into the crack. Check the wire frame under the stucco to ensure that it's intact; this frame allows the stucco patch to stick.
Seal the crack with the appropriate patching material, and ensure that the patch matches the rough texture of the rest of the stucco. For smaller cracks, caulk will work fine; just squeeze the tube, applying the caulk directly into the crack. Larger cracks require stucco patch, which you can pack into the crack using your fingers.
Apply primer once the stucco patch is dry using the paintbrush or roller. Allow the primer to dry thoroughly, as per the instructions on the container, and then paint over it. You may need to apply more than one coat of paint to get a perfect color match.