Adding to what HallsofIvy said, the colors of coordination compunds arises from the splitting of the d-orbitals as explained by the Crystal Field theory.
If you want more information, you can look up any good inorganic chemistry book like Concise Inorganic chemistry by J.D Lee. I found that coordination compounds are explained well in it.
EDIT: I assumed that you meant Cobalt 2+ complexes.