Some elements are rare on the moon, and so in practice these would be supplied from the Earth, but in principle the colony could be entirely independent of the Earth if it sent robot space vehicles to mine asteroids for such elements, or if it manufactured them by transmutation.