What you refer green is a "solder mask".
Solder Mask – There is a coating on the top and bottom of the PCB that prevents solder from flowing freely on the board. This is what gives most circuit boards their green color.
Those Green color are called solder mask.They are available in many colors including Green & black.
The purpose is to protect the Cu layer from corrosion and provide good insulation.
Most importantly - solder mask (as the name suggests) prevents the solder from bridging adjacent traces and pins. Not all circuit boards have solder mask, though. Many cheap boards in the power supplied don't have it.
You have to follow RoHS-a European Union Directive 2002/95/EC while using spray etching.
In most cases, the etchant will either be Ferric Chloride or Ammonium Persulfate (Ferric Chloride is more popular). These are available in both liquid (i.e., premixed) and powder form; the powder is generally quite a bit cheaper, but requires care when mixing.
Also note that etching proceeds faster with
(1) warmer etchant, and
(2) agitation.