Soda (sodium dioxide) - aka "alkali," "soda-ash," or "potash" in the trade (Trowbridge 1870; Toulouse 1969) - is added to the sand as a "flux" to lower the melting temperature of the silica.
Lime (calcium oxide) is added to the batch as a stabilizer since simple glass made from just sand and soda ("water glass") is water soluble making it of little use when formed into a bottle (Tooley 1953; Kendrick 1968; Jones & Sullivan 1989).
This is done by adding certain types of compounds to the glass batch in certain quantities.
Bottles made from glass with just the basic ingredients (sand, soda & lime) will usually be different shades of green because of the iron impurities in the sand, though other colors can also be attained depending on many factors.
Glass which is composed of pure silica (99.9% ) would be colorless glass.
However, making glass from pure silica is not practical or commercially viable because of the prohibitive expense of acquiring such in its pure state and the much higher temperatures needed to properly melt.
Broken glass (aka "cullet") on hand from misblown, broken or returned bottles was also often added (Toulouse 1969).
From this point in the glass producing process, the final color of the glass is a matter of both controlling off-coloring impurities and achieving the desired color.
The silica (silica dioxide) typically makes up 60-80 % of the glass composition and is primarily derived from sand.
For instance, cobalt oxide added in proper quantities to a properly prepared glass batch results in a distinctly intense blue as shown in the bottle to the left.
In fact, this color is known as "cobalt blue" in the glass manufacturing world (Scholes 1952).
The purer the sand (i.e., the higher the silica concentration and less iron) the better, as it is the other impurities - desired or undesired - that give glass its color.
Low iron means more control over the ultimate color (Hunter 1950; Tooley 1953).