"Ferric ammonium citrate" - Fe3+/NH4+/C6H5O73-
Ferric ammonium citrate is not a well-defined compound with an exact formula. It can be regarded as a compound, containing ferric ions, citrate ions and ammonium ions in such a ratio that the compound is electrically neutral. However, the compound does not contain free ferric ions. The ferric ions are coordinated to citrate ions. Besides these ions, there also can be ammonia molecules and water molecules incorporated in the crystal lattice. The ratio between the different ions and molecules in the compound determines its color.
The brown compound is somewhat alkaline and has some ammonia and water in the crystal lattice. The green compound is somewhat acidic. Here, the iron is coordinated more strongly to the citrate ion.
Approximate empirical formulas are the following:
brown: Fe C6H5O7 . 2NH3 . 2H2O
green: Fe2 (NH4 C6H5O7)3
These formulas do not tell anything about the real structure of the compound (e.g. the Fe3+ ion is not a free ion), but these formulas fairly closely give an indication of the relative iron content, ammonia content and citrate content.