Highly selective colorimetric sensing of Hg(II) ions in aqueous medium and in the solid state via formation of a novel M-C bond.