I have been reading Suzanne Bell's textbook Forensic Chemistry, 2nd ed., pp. 239-241 with the hope of understanding this chemistry. Let us represent the conjugate base of cocaine as NR3. The test has three reagents added successively in a test tube: cobalt thiocyanate, Co(SCN)2(H2O)3, HCl, and chloroform. In the presence of cocaine a blue complex is extracted into the organic layer.
Under acidic conditions {Co(NR3)2}(SCN)2 is favored and under neutral or basic conditions (HNR3)2){Co(SCN)4} is favored. The latter form is blue and is not soluble in water (it forms crystals), but it is soluble in chloroform. The other complex, which is water-soluble, and Co(SCN)42- are both pink or pinkish.
Does anyone know of a good discussion of this chemistry? For one thing, it is not entirely clear where the extra thiocyanates are coming from. Presumably other cobalt ions are providing them. For another thing it is unclear to me why the blue complex is more organic-soluble than the pinkish complex. I imagine that I could think of other questions...