The affinity of melanin for inorganic ions