Permanent markers leave deep rich colors that are ideal for artwork, but not so ideal on the carpet. Thankfully, those new colors on the carpet fibers do not have to be permanent. Remove them using any of several cleaning solutions made from household products. If the homemade solutions don't finish the job, purchase a stain remover made to lift ink-type stains from fabrics and carpeting.
If the stain is so fresh you saw it happen, grab an absorbent white cloth and dab up as much ink as possible. This technique works well, for instance, if a marker breaks open and leaks. Squirt a tablespoon or so of liquid dish soap on a damp white cloth and blot the stain, wiping from the outer edges toward the center. Dab the area with folded plain paper towels, alternating between the soap and the paper towels so the paper absorbs a bulk of the ink, rather than the carpet fibers drawing it in.
Mix 1 tablespoon each of vinegar and liquid dish soap into 2 cups of warm water. Wet a white cloth with the liquid and dab it over the stain, checking the cloth frequently to see if any of the ink has been absorbed into the cloth. If so, use a fresh area of the cloth to reapply more soapy solution. If you must rub the stain a bit to remove the ink, rub from the outer edges toward the middle, rather than wiping across the stain, because that may spread the ink. Wet the area with water afterward, and then dab with an absorbent white cloth to lift any remaining water or ink. Continue dabbing until you've removed as much moisture as possible.
Lift the ink out of the carpet fibers by blotting the stain with an absorbent white cloth dipped in rubbing alcohol. Dab the area repeatedly, wiping from the edges of the stain toward its center to keep the ink from spreading. The alcohol lifts the ink, so it may transfer quickly over to the cloth. Replace the cloth or refold it to a fresh area as soon as it becomes stained, otherwise you may spread the ink. Test the alcohol on an inconspicuous area of the carpet before you use it, to make sure it doesn't fade the carpet color too.
A store-bought stain remover tackles the task when other solutions do not completely remove the ink. Opt for a citrus-based stain remover designed to lift inks from fabrics, upholstery and carpeting. Natural cleaners such as citrus solutions are less likely to emit toxic chemicals that may be problematic for those with asthma or chemical sensitivities. Blot the area with the citrus cleaner applied to a white cloth, holding the cloth in place for a minute or so. Continue blotting with fresh areas of the cloth until the ink transfers over to the cloth. Clean the area afterward with mildly soapy water on a white cloth, followed by a fresh damp cloth.