A food coloring is any substance that is added to food or drink to change its color. Food coloring is used both in commercial food production and in cooking at home.

Purpose of food coloring 
People associate certain colors with certain flavors. The color of the food can therefore influence its perceived flavor in anything from candy to wine.
For this reason, food manufacturers add dyes to their products. One of the reasons this is done is to simulate the colour the customer expects as natural. An example would be to add red coloring to glacé cherries. Without coloring, the cherries would be beige. Food coloring can also be done for effect, such as a green ketchup instead of an expected red.
Most people are aware that food with bright or unnatural colors, such as the green ketchup mentioned, contains food coloring. Far fewer people know that "natural" foods such as oranges and salmon may also be dyed to hide natural variations in color. The color of foods varies through the seasons. Processing food and storing it may change its color. For these reasons, it may give a commercial advantage to add colors to food, so that it has the color expected or preferred by the customers. Some of the main reasons are:
Compensate for  color lost due to light, air, extremes of temperature, moisture, and storage conditions.
Hide natural variations in color
Make the naturally occurring colors stronger
Give identity to food, so it can be associated with the color
Protect flavors and vitamins from damage by light.
Decorative or artistic purposes such as cake icing

Regulation 
Food colorings need to be tested before they can be used. These tests are done to make sure the coloring is not poisonous, and has no unwanted side-effects. Sometimes, different testing-bodies have different opinions on the safety of a certain coloring. In the United States, FD&C (generally indicates that the FDA has approved the colorant for use in Foods, Drugs and Cosmetics) numbers are given to approved synthetic food dyes that do not exist in nature. In the European Union, E numbers are used for all additives, both synthetic and natural, that are approved in food applications.

Most other countries have their own regulations and list of food colors which can be used in various applications, including maximum daily intake limits.

Natural colors are not required to be tested by a number of regulatory bodies throughout the world, including the United States FDA. The FDA lists "color additives exempt from certification" for food.

Natural food dyes 
A growing number of natural food dyes are being commercially produced, partly due to consumer concerns surrounding synthetic dyes.  Some examples include:

 Caramel coloring, made from caramelized sugar, used in cola products and also in cosmetics.
 Annatto, a reddish-orange dye made from the seed of the Achiote.
 A green dye made from chlorella algae.
 Cochineal, a red dye derived from the cochineal insect, Dactylopius coccus.
 Beet juice
 turmeric
 saffron
 paprika

To make it easy to get the exact color, these color components are often available in very pure form. They can also be used with suitable carrier materials.

Dyes and lakes 
In the United States, certifiable color additives are available for use in food as either "dyes" or "lakes".

Dyes dissolve in water, but are not soluble in oil.  Dyes are manufactured as powders, granules, liquids or other special purpose forms. They can be used in drinks, dry mixes, baked goods, confections, dairy products, pet foods and many other products. Dyes also have side effects which lakes do not, including the fact that large amounts of dyes ingested can color stools.

Lakes are the combination of dyes and insoluble material.  Lakes tint by dispersion.  Lakes are not oil soluble, but are oil dispersible.  Lakes are more stable than dyes and are ideal for coloring products containing fats and oils or items lacking sufficient moisture to dissolve dyes.  Typical uses include coated tablets, cake and donut mixes, hard candies and chewing gums, lipsticks, soaps, shampoos, talc etc.

Other uses 
Because food dyes are generally safer to use than normal artistic dyes and pigments, some artists have used food coloring as a means of making pictures, especially in forms such as body-painting.
Food colorings can be used to dye fabric, but are usually not wash-fast when used on cotton, hemp and other plant fibres. Some food dyes can be fixed on Nylon and animal fibers.

Criticism and health implications 
In the past, research has not shown any link between  Attention Deficit Hyperactivity Disorder and food dyes. Newer studies show that synthetic preservatives and artificial coloring agents can make the symptoms of ADD and ADHD worse. The older studies were inclonclusive on this point, perhaps because the  clinical methods of measuring this behavior were inappropriate. Parents' reports of food additives proved to be better indicators whether additives were present than clinical tests. Several major studies show academic performance increased and disciplinary problems decreased in large non-ADD student populations when artificial ingredients and artificial coloring were eliminated from school food programs.
 Norway banned all products containing coal tar and coal tar derivatives in 1978. New legislation lifted this ban in 2001 after EU regulations.  As such, many FD&C approved colorings have been banned.
 Tartrazine causes hives in less than 0.01% of those exposed to it
 Erythrosine is linked to thyroid tumors in rats.

References

Other websites 
 FDA/CFSAN Food Color Facts
 Natural Food Colors (Food-Info)

Food ingredients
Chemistry