Color comes from the choice of light

When white light hits a substance, certain wavelengths are absorbed, and the remaining light enters our eyes, whereupon we see the corresponding complementary color. The electronic structure in a molecule determines which wavelengths it absorbs.

Coordination environment changes color

After metal ions are combined with different ligands, the electronic energy level spacing will change, and the absorption spectrum will also change accordingly. This is why many chromogenic reactions can be used to detect ions.

Color is conditional

Concentration, pH, solvent and temperature all affect color shades. Reliable chemical analysis will not be judged by the naked eye alone, but will also be combined with standard curves or spectrometer measurements.