At a Friday Evening Discourse at London's Royal Institution on April 7, 1865, he displayed molecular models of simple organic substances such as methane, ethane, and methyl chloride, which he had had constructed from differently colored table croquet balls connected together with thin brass tubes.
[3] Their models represented atoms by faceted hardwood balls, painted in different bright colors to indicate the respective chemical elements.
For example, hydrogen is a colorless gas, carbon as charcoal, graphite or coke is black, sulfur powder is yellow, chlorine is a greenish gas, bromine is a dark red liquid, iodine in ether is violet, amorphous phosphorus is red, rust is dark orange-red, etc.
Perhaps red for oxygen is inspired by the fact that oxygen is normally required for combustion or that the oxygen-bearing chemical in blood, hemoglobin, is bright red, and the blue for nitrogen by the fact that nitrogen is the main component of Earth's atmosphere, which appears to human eyes as being colored sky blue.
"On the Combining Power of Atoms", Chemical News, 12 (1865, 176–9, 189, states that "Hofmann, at a lecture given at the Royal Institution in April 1865 made use of croquet balls of different colours to represent various kinds of atoms (e.g. carbon black, hydrogen white, chlorine green, 'fiery' oxygen red, nitrogen blue).