Food coloring is a dye and, depending on what kind of yarn in your carpet, may not come out. Anything that would remove the dye in the stain would remove the dye that gives the carpet it's color. In that case the stain would have to be cut out and the area seamed in assuming you have some more of the material out of the same dye lot. With that in mind, try the technique that follows.
The first step is to find something that will liquify the stain, then vacuum it out. Wiping and blotting it most often spreads the stain. Try dry cleaning fluid (tetrachloroethene). It's sold in hardware and home supply stores.
Hook up a wet pickup vacuum cleaner using the crevice tool for maximum suction. Before you put the fluid (or any solvent) on the stained spot, put some on a small area back in the corner of a closet to test whether it removes the color or damages the carpet in any way. Don't apply enough to soak into the backing.
If it passes that test, alternate applying the fluid to the stained spot, let it sit for a few minutes then agitate it lightly with a fine brush and vacuum the fluid off.
Again, the object is for the fluid to liquify the stain so the vacuum can remove it.